public function FlagCountManagerInterface::getFlagEntityCount in Flag 8.4
Gets the count of entities flagged by the given flag.
For example, with a 'report abuse' flag, this returns the number of entities that have been reported, not the total number of reports. In other words, an entity that has been reported multiple times will only be counted once.
Parameters
\Drupal\flag\FlagInterface $flag: The flag for which to retrieve a flag count.
Return value
int The number of entities that are flagged with the flag.
1 method overrides FlagCountManagerInterface::getFlagEntityCount()
- FlagCountManager::getFlagEntityCount in src/
FlagCountManager.php - Gets the count of entities flagged by the given flag.
File
- src/
FlagCountManagerInterface.php, line 66
Class
- FlagCountManagerInterface
- Interface FlagCountManagerInterface.
Namespace
Drupal\flagCode
public function getFlagEntityCount(FlagInterface $flag);