public function FlagListsService::getAllFlaggingCollections in Flag Lists 4.0.x
Same name and namespace in other branches
- 8 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 106
Class
- FlagListsService
- Class FlagForList service.
Namespace
Drupal\flag_listsCode
public function getAllFlaggingCollections($type = NULL) {
$query = $this->entityTypeManager
->getStorage('flagging_collection')
->getQuery();
if ($type != NULL) {
$query
->condition('type', $type);
}
$ids = $query
->execute();
$flags = $this
->getFlaggingCollectionByIds($ids);
return $flags;
}