function diff_test_entity_field_access in Diff 8
Implements hook_entity_field_access().
File
- tests/
modules/ diff_test/ diff_test.module, line 29 - Helper module for the diff tests.
Code
function diff_test_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
if ($field_definition
->getName() == 'field_diff_deny_access') {
return AccessResult::forbidden();
}
return AccessResult::allowed();
}