class ImageAccessTestHiddenHooks

Hook implementations for image_access_test_hidden.

Hierarchy

Expanded class hierarchy of ImageAccessTestHiddenHooks

File

core/modules/image/tests/modules/image_access_test_hidden/src/Hook/ImageAccessTestHiddenHooks.php, line 16

Namespace

Drupal\image_access_test_hidden\Hook
View source
class ImageAccessTestHiddenHooks {
    
    /**
     * Implements hook_entity_field_access().
     */
    public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) {
        if ($field_definition->getName() == 'field_image' && $operation == 'edit') {
            return AccessResult::forbidden();
        }
        return AccessResult::neutral();
    }

}

Members

Title Sort descending Modifiers Object type Summary
ImageAccessTestHiddenHooks::entityFieldAccess public function Implements hook_entity_field_access().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.