public function ChangedFieldItemList::defaultAccess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Field/ChangedFieldItemList.php \Drupal\Core\Field\ChangedFieldItemList::defaultAccess()
Contains the default access logic of this field.
See \Drupal\Core\Entity\EntityAccessControlHandlerInterface::fieldAccess() for the parameter documentation.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
Overrides FieldItemList::defaultAccess
File
- core/
lib/ Drupal/ Core/ Field/ ChangedFieldItemList.php, line 21 - Contains \Drupal\Core\Field\ChangedFieldItemList.
Class
- ChangedFieldItemList
- Defines a item list class for changed fields.
Namespace
Drupal\Core\FieldCode
public function defaultAccess($operation = 'view', AccountInterface $account = NULL) {
// It is not possible to edit the changed field.
return AccessResult::allowedIf($operation !== 'edit');
}