You are here

public function FlagListsService::getFlaggingCollectionIdByRelated in Flag Lists 4.0.x

Get Flaggging Collection ids by related flag.

Parameters

string $name: The name of the Related Flag to Flagging Collection to load.

Return value

int[] The Flagging Collection id

File

src/FlagListsService.php, line 295

Class

FlagListsService
Class FlagForList service.

Namespace

Drupal\flag_lists

Code

public function getFlaggingCollectionIdByRelated($name) {
  $query = $this->entityTypeManager
    ->getStorage('flagging_collection')
    ->getQuery();
  $query
    ->condition('relatedflag', $name);
  $id = $query
    ->execute();
  return $id;
}