public function EntityField::access in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::access()
Check whether given user has access to this handler.
Parameters
\Drupal\Core\Session\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/ EntityField.php, line 242
Class
- EntityField
- A field that displays entity field data.
Namespace
Drupal\views\Plugin\views\fieldCode
public function access(AccountInterface $account) {
$access_control_handler = $this->entityTypeManager
->getAccessControlHandler($this
->getEntityType());
return $access_control_handler
->fieldAccess('view', $this
->getFieldDefinition(), $account);
}