interface AccessibleInterface

Interface for checking access.

Hierarchy

Expanded class hierarchy of AccessibleInterface

All classes that implement AccessibleInterface

4 files declare their use of AccessibleInterface
EntityAccessTest.php in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php
Contains Drupal\system\Tests\Entity\EntityAccessTest.
EntityInterface.php in drupal/core/lib/Drupal/Core/Entity/EntityInterface.php
Contains \Drupal\Core\Entity\EntityInterface.
EntityTranslation.php in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php
Contains \Drupal\Core\Entity\Type\EntityTranslation.
FieldInterface.php in drupal/core/lib/Drupal/Core/Entity/Field/FieldInterface.php
Contains \Drupal\Core\Entity\Field\FieldInterface.

File

drupal/core/lib/Drupal/Core/TypedData/AccessibleInterface.php, line 15
Contains \Drupal\Core\TypedData\AccessibleInterface.

Namespace

Drupal\Core\TypedData
View source
interface AccessibleInterface {

  /**
   * Checks data value access.
   *
   * @param string $operation
   *   (optional) The operation to be performed. Supported values are:
   *   - view
   *   - create
   *   - update
   *   - delete
   *   Defaults to 'view'.
   * @param Drupal\Core\Session\AccountInterface $account
   *   (optional) The user for which to check access, or NULL to check access
   *   for the current user. Defaults to NULL.
   *
   * @return bool
   *   TRUE if the given user has access for the given operation, FALSE
   *   otherwise.
   *
   * @todo Don't depend on module level code.
   */
  public function access($operation = 'view', AccountInterface $account = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
AccessibleInterface::access public function Checks data value access. 5