You are here

public function FlagListsService::getFlaggingCollectionIdByName in Flag Lists 8

Same name and namespace in other branches
  1. 4.0.x src/FlagListsService.php \Drupal\flag_lists\FlagListsService::getFlaggingCollectionIdByName()

Get Flaggging Collection ids by name.

NOT used nor tested!

Parameters

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

Return value

int[] The Flagging Collection id

File

src/FlagListsService.php, line 273

Class

FlagListsService
Class FlagForList service.

Namespace

Drupal\flag_lists

Code

public function getFlaggingCollectionIdByName($relatedName) {
  $query = $this->entityQueryManager
    ->get('flagging_collection');

  // The name is actually the same as the relatedName.
  $query
    ->condition('relatedflag', $relatedName);
  $id = $query
    ->execute();
  return $id;
}