function _rac_get_supported_entity_types in Role Access Control 8
Same name and namespace in other branches
- 8.2 rac.module \_rac_get_supported_entity_types()
Get entity types which have access controled by rac plugins.
Controlled entity types are defined by Role Access Consumer Plugins. Each plugin provides a list of the entity types it handles access control for.
Return value
array List of entity type ids.
1 call to _rac_get_supported_entity_types()
- rac_form_field_storage_config_edit_form_alter in ./
rac.module - Implements hook_form_FORM_ID_alter().
File
- ./
rac.module, line 325 - Module providing role access relations.
Code
function _rac_get_supported_entity_types() {
static $supportedTypes = NULL;
if ($supportedTypes === NULL) {
// For each consumer get its list of supported entity types.
$supportedTypes = [];
foreach (_rac_get_consumers() as $consumer) {
$supportedTypes = array_merge($supportedTypes, $consumer
->getSupportedEntityTypes());
}
}
return $supportedTypes;
}