public function FlagListsService::getAllFlaggingCollections in Flag Lists 8
Same name and namespace in other branches
- 4.0.x src/FlagListsService.php \Drupal\flag_lists\FlagListsService::getAllFlaggingCollections()
Get all Flagging Collections.
Parameters
string $type: The type, bundle, of the Flagging Collection.
Return value
Drupal\flag_lists\Entity\FlaggingCollection[] An array of the found Flagging Collections.
File
- src/
FlagListsService.php, line 114
Class
- FlagListsService
- Class FlagForList service.
Namespace
Drupal\flag_listsCode
public function getAllFlaggingCollections($type = NULL) {
$query = $this->entityQueryManager
->get('flagging_collection');
if ($type != NULL) {
$query
->condition('type', $type);
}
$ids = $query
->execute();
$flags = $this
->getFlaggingCollectionByIds($ids);
return $flags;
}