You are here

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

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

Get Flaggging Collection ids by name.

Parameters

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

Return value

int[] The Flagging Collection id

File

src/FlagListsService.php, line 277

Class

FlagListsService
Class FlagForList service.

Namespace

Drupal\flag_lists

Code

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