LanguageEntityFieldAccessTestHooks.php

Namespace

Drupal\language_entity_field_access_test\Hook

File

core/modules/language/tests/language_entity_field_access_test/src/Hook/LanguageEntityFieldAccessTestHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\language_entity_field_access_test\Hook;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for language_entity_field_access_test.
 */
class LanguageEntityFieldAccessTestHooks {
    
    /**
     * Implements hook_entity_field_access().
     */
    public function entityFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) {
        return AccessResult::forbidden();
    }

}

Classes

Title Deprecated Summary
LanguageEntityFieldAccessTestHooks Hook implementations for language_entity_field_access_test.

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