public function AccessibleInterface::access

Checks data value access.

@todo Don't depend on module level code.

Parameters

string $operation: (optional) The operation to be performed. Supported values are:

  • view
  • create
  • update
  • delete

Defaults to 'view'.

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 value

bool TRUE if the given user has access for the given operation, FALSE otherwise.

5 methods override AccessibleInterface::access()
Entity::access in drupal/core/lib/Drupal/Core/Entity/Entity.php
Implements \Drupal\Core\TypedData\AccessibleInterface::access().
EntityBCDecorator::access in drupal/core/lib/Drupal/Core/Entity/EntityBCDecorator.php
Forwards the call to the decorated entity.
EntityTranslation::access in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php
Implements \Drupal\Core\TypedData\AccessibleInterface::access().
Field::access in drupal/core/lib/Drupal/Core/Entity/Field/Type/Field.php
Implements \Drupal\Core\TypedData\AccessibleInterface::access().
ViewUI::access in drupal/core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php
Implements \Drupal\Core\TypedData\AccessibleInterface::access().

File

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

Class

AccessibleInterface
Interface for checking access.

Namespace

Drupal\Core\TypedData

Code

public function access($operation = 'view', AccountInterface $account = NULL);