You are here

protected function FlagService::getFlaggingsByIds in Flag 8.4

Loads flagging entities given their IDs.

Parameters

int[] $ids: The flagging IDs.

Return value

\Drupal\flag\FlaggingInterface[] An array of flaggings.

6 calls to FlagService::getFlaggingsByIds()
FlagService::getAllEntityFlaggings in src/FlagService.php
Get all flaggings for the given entity, and optionally, user.
FlagService::getEntityFlaggings in src/FlagService.php
Get flaggings for the given entity, flag, and optionally, user.
FlagService::getFlaggingUsers in src/FlagService.php
Get a list of users that have flagged an entity.
FlagService::unflagAllByEntity in src/FlagService.php
Remove all flaggings from an entity.
FlagService::unflagAllByFlag in src/FlagService.php
Remove all flaggings from a flag.

... See full list

File

src/FlagService.php, line 385

Class

FlagService
Flag service.

Namespace

Drupal\flag

Code

protected function getFlaggingsByIds(array $ids) {
  return $this->entityTypeManager
    ->getStorage('flagging')
    ->loadMultiple($ids);
}