public function FlagServiceInterface::getAllFlags in Flag 8.4
List all flags available.
For example to list all flags operating on articles:
$this->flagService
->getAllFlags('node', 'article');
If all the parameters are omitted, a list of all flags will be returned.
Note that this does not check for any kind of access.
Parameters
string $entity_type: (optional) The type of entity for which to load the flags.
string $bundle: (optional) The bundle for which to load the flags.
Return value
\Drupal\flag\FlagInterface[] An array of flag entities, keyed by the entity IDs.
1 method overrides FlagServiceInterface::getAllFlags()
- FlagService::getAllFlags in src/
FlagService.php - List all flags available.
File
- src/
FlagServiceInterface.php, line 35
Class
- FlagServiceInterface
- Flag service interface.
Namespace
Drupal\flagCode
public function getAllFlags($entity_type = NULL, $bundle = NULL);