You are here

public function Field::access in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/field/Field.php \Drupal\views\Plugin\views\field\Field::access()

Check whether given user has access to this handler.

Parameters

AccountInterface $account: The user account to check.

Return value

bool TRUE if the user has access to the handler, FALSE otherwise.

Overrides HandlerBase::access

File

core/modules/views/src/Plugin/views/field/Field.php, line 216
Contains \Drupal\views\Plugin\views\field\Field.

Class

Field
A field that displays entity field data.

Namespace

Drupal\views\Plugin\views\field

Code

public function access(AccountInterface $account) {
  $access_control_handler = $this->entityManager
    ->getAccessControlHandler($this
    ->getEntityType());
  return $access_control_handler
    ->fieldAccess('view', $this
    ->getFieldDefinition(), $account);
}