public function FieldItemList::defaultAccess in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldItemList.php \Drupal\Core\Field\FieldItemList::defaultAccess()
- 10 core/lib/Drupal/Core/Field/FieldItemList.php \Drupal\Core\Field\FieldItemList::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 FieldItemListInterface::defaultAccess
3 methods override FieldItemList::defaultAccess()
- ChangedFieldItemList::defaultAccess in core/
lib/ Drupal/ Core/ Field/ ChangedFieldItemList.php - Contains the default access logic of this field.
- LayoutSectionItemList::defaultAccess in core/
modules/ layout_builder/ src/ Field/ LayoutSectionItemList.php - Overrides \Drupal\Core\Field\FieldItemListInterface::defaultAccess().
- PathFieldItemList::defaultAccess in core/
modules/ path/ src/ Plugin/ Field/ FieldType/ PathFieldItemList.php - Contains the default access logic of this field.
File
- core/
lib/ Drupal/ Core/ Field/ FieldItemList.php, line 160
Class
- FieldItemList
- Represents an entity field; that is, a list of field item objects.
Namespace
Drupal\Core\FieldCode
public function defaultAccess($operation = 'view', AccountInterface $account = NULL) {
// Grant access per default.
return AccessResult::allowed();
}