function AuthorFormatter::checkAccess
Same name in other branches
- 9 core/modules/user/src/Plugin/Field/FieldFormatter/AuthorFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\AuthorFormatter::checkAccess()
- 8.9.x core/modules/user/src/Plugin/Field/FieldFormatter/AuthorFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\AuthorFormatter::checkAccess()
- 11.x core/modules/user/src/Plugin/Field/FieldFormatter/AuthorFormatter.php \Drupal\user\Plugin\Field\FieldFormatter\AuthorFormatter::checkAccess()
Overrides EntityReferenceFormatterBase::checkAccess
File
-
core/
modules/ user/ src/ Plugin/ Field/ FieldFormatter/ AuthorFormatter.php, line 55
Class
- AuthorFormatter
- Plugin implementation of the 'author' formatter.
Namespace
Drupal\user\Plugin\Field\FieldFormatterCode
protected function checkAccess(EntityInterface $entity) {
return $entity->access('view label', NULL, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.