diff --git a/core/lib/Drupal/Core/Entity/Field/Field.php b/core/lib/Drupal/Core/Entity/Field/Field.php index 17c4c30..87317f0 100644 --- a/core/lib/Drupal/Core/Entity/Field/Field.php +++ b/core/lib/Drupal/Core/Entity/Field/Field.php @@ -168,7 +168,7 @@ public function __unset($property_name) { } /** - * Implements \Drupal\Core\TypedData\AccessibleInterface::access(). + * {@inheritdoc} */ public function access($operation = 'view', AccountInterface $account = NULL) { $access_controller = \Drupal::entityManager()->getAccessController($this->getParent()->entityType()); @@ -176,15 +176,7 @@ public function access($operation = 'view', AccountInterface $account = NULL) { } /** - * 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 bool - * TRUE if access to this field is allowed per default, FALSE otherwise. + * {@inheritdoc} */ public function defaultAccess($operation = 'view', AccountInterface $account = NULL) { // Grant access per default. diff --git a/core/lib/Drupal/Core/Entity/Field/FieldInterface.php b/core/lib/Drupal/Core/Entity/Field/FieldInterface.php index 0d85da3..e7b8483 100644 --- a/core/lib/Drupal/Core/Entity/Field/FieldInterface.php +++ b/core/lib/Drupal/Core/Entity/Field/FieldInterface.php @@ -36,6 +36,18 @@ public function getFieldDefinition(); /** + * 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. + * + * @return bool + * TRUE if access to this field is allowed per default, FALSE otherwise. + */ + public function defaultAccess($operation = 'view', AccountInterface $account = NULL); + + /** * Filters out empty field items and re-numbers the item deltas. */ public function filterEmptyValues();