public function FlagListsService::getUsersFlaggingCollections in Flag Lists 4.0.x
Same name and namespace in other branches
- 8 src/FlagListsService.php \Drupal\flag_lists\FlagListsService::getUsersFlaggingCollections()
Get current user's Flagging Collections.
Return value
Drupal\flag_lists\Entity\FlaggingCollection[] An array of current User's Flagging Collections.
File
- src/
FlagListsService.php, line 85
Class
- FlagListsService
- Class FlagForList service.
Namespace
Drupal\flag_listsCode
public function getUsersFlaggingCollections() {
$query = $this->entityTypeManager
->getStorage('flagging_collection')
->getQuery();
$query
->condition('user_id', $this->currentUser
->id());
$ids = $query
->execute();
$flags = $this
->getFlaggingCollectionByIds($ids);
return $flags;
}