public function FlagListsService::getUsersFlaggingCollections in Flag Lists 8
Same name and namespace in other branches
- 4.0.x 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 95
Class
- FlagListsService
- Class FlagForList service.
Namespace
Drupal\flag_listsCode
public function getUsersFlaggingCollections() {
$query = $this->entityQueryManager
->get('flagging_collection');
$query
->condition('user_id', $this->currentUser
->id());
$ids = $query
->execute();
$flags = $this
->getFlaggingCollectionByIds($ids);
return $flags;
}