function QuickEditEntityFieldAccessCheck::accessEditEntityField
Same name in other branches
- 9 core/modules/quickedit/src/Access/QuickEditEntityFieldAccessCheck.php \Drupal\quickedit\Access\QuickEditEntityFieldAccessCheck::accessEditEntityField()
Overrides QuickEditEntityFieldAccessCheckInterface::accessEditEntityField
1 call to QuickEditEntityFieldAccessCheck::accessEditEntityField()
- QuickEditEntityFieldAccessCheck::access in core/
modules/ quickedit/ src/ Access/ QuickEditEntityFieldAccessCheck.php - Checks Quick Edit access to the field.
File
-
core/
modules/ quickedit/ src/ Access/ QuickEditEntityFieldAccessCheck.php, line 43
Class
- QuickEditEntityFieldAccessCheck
- Access check for in-place editing entity fields.
Namespace
Drupal\quickedit\AccessCode
public function accessEditEntityField(EntityInterface $entity, $field_name) {
return $entity->access('update', NULL, TRUE)
->andIf($entity->get($field_name)
->access('edit', NULL, TRUE));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.