public function FlagListsService::getFlagListItemIds in Flag Lists 4.0.x
Same name and namespace in other branches
- 8 src/FlagListsService.php \Drupal\flag_lists\FlagListsService::getFlagListItemIds()
Get Flag For List ids.
Parameters
string $baseflag: The base flag to use.
string $flag_list: The flag list.
int $entity_id: The entity id.
Return value
int[] An array of ids for the Flag For Lists
File
- src/
FlagListsService.php, line 238
Class
- FlagListsService
- Class FlagForList service.
Namespace
Drupal\flag_listsCode
public function getFlagListItemIds($baseflag, $flag_list = NULL, $entity_id = NULL) {
$query = $this->entityTypeManager
->getStorage('flag_list_item')
->getQuery();
$query
->condition('baseflag', $baseflag);
if ($flag_list != NULL) {
$query
->condition('flag_list', $flag_list);
}
if ($entity_id != NULL) {
$query
->condition('entity_id', $entity_id);
}
$ids = $query
->execute();
return $ids;
}