You are here

public function FieldItemList::defaultAccess in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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

2 methods override FieldItemList::defaultAccess()
ChangedFieldItemList::defaultAccess in core/lib/Drupal/Core/Field/ChangedFieldItemList.php
Contains the default access logic of this field.
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 176
Contains \Drupal\Core\Field\FieldItemList.

Class

FieldItemList
Represents an entity field; that is, a list of field item objects.

Namespace

Drupal\Core\Field

Code

public function defaultAccess($operation = 'view', AccountInterface $account = NULL) {

  // Grant access per default.
  return AccessResult::allowed();
}