class FieldTestBooleanAccessDeniedHooks
Hook implementations for field_test_boolean_access_denied.
Hierarchy
- class \Drupal\field_test_boolean_access_denied\Hook\FieldTestBooleanAccessDeniedHooks
Expanded class hierarchy of FieldTestBooleanAccessDeniedHooks
File
-
core/
modules/ field/ tests/ modules/ field_test_boolean_access_denied/ src/ Hook/ FieldTestBooleanAccessDeniedHooks.php, line 16
Namespace
Drupal\field_test_boolean_access_denied\HookView source
class FieldTestBooleanAccessDeniedHooks {
/**
* Implements hook_entity_field_access().
*/
public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) {
return AccessResult::forbiddenIf($field_definition->getName() === \Drupal::state()->get('field.test_boolean_field_access_field'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.