public function Field::defaultAccess

Contains the default access logic of this field.

See \Drupal\Core\TypedData\AccessibleInterface::access() for the parameter doucmentation. This method can be overriden by field sub classes to provide a different default access logic. That allows them to inherit the complete access() method which contains the access hook invocation logic.

Return value

bool TRUE if access to this field is allowed per default, FALSE otherwise.

1 call to Field::defaultAccess()
Field::access in drupal/core/lib/Drupal/Core/Entity/Field/Type/Field.php
Implements \Drupal\Core\TypedData\AccessibleInterface::access().

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/Field.php, line 193
Contains \Drupal\Core\Entity\Field\Type\Field.

Class

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

Namespace

Drupal\Core\Entity\Field\Type

Code

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

  // Grant access per default.
  return TRUE;
}