public function EntityAccessByFieldPermissions::getEntityAccessFields in Open Social 8.9
Same name and namespace in other branches
- 8 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.2 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.3 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.4 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.5 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.6 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.7 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 8.8 modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 10.3.x modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 10.0.x modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 10.1.x modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
- 10.2.x modules/custom/entity_access_by_field/src/EntityAccessByFieldPermissions.php \Drupal\entity_access_by_field\EntityAccessByFieldPermissions::getEntityAccessFields()
Get all fields of type entity_access_field.
Return value
array Returns all the fields with the entity type entity_acces_field.
2 calls to EntityAccessByFieldPermissions::getEntityAccessFields()
- EntityAccessByFieldPermissions::getRealmWithPermission in modules/
custom/ entity_access_by_field/ src/ EntityAccessByFieldPermissions.php - Get the realms array with permissions as value.
- EntityAccessByFieldPermissions::permissions in modules/
custom/ entity_access_by_field/ src/ EntityAccessByFieldPermissions.php - Return all the permissions generated by this user.
File
- modules/
custom/ entity_access_by_field/ src/ EntityAccessByFieldPermissions.php, line 153
Class
- EntityAccessByFieldPermissions
- EntityAccessByFieldPermissions.
Namespace
Drupal\entity_access_by_fieldCode
public function getEntityAccessFields($entity, $bundle) {
$fields = [];
$field_definitions = $this->entityManager
->getFieldDefinitions($entity, $bundle
->id());
foreach ($field_definitions as $field_name => $field_definition) {
if (!empty($field_definition
->getTargetBundle())) {
if ($field_definition
->getType() === 'entity_access_field') {
$fields[$field_name] = $field_definition;
}
}
}
return $fields;
}