interface ContextAwareInterface

Interface for context aware data.

Hierarchy

Expanded class hierarchy of ContextAwareInterface

All classes that implement ContextAwareInterface

8 files declare their use of ContextAwareInterface
EntityNG.php in drupal/core/lib/Drupal/Core/Entity/EntityNG.php
Definition of Drupal\Core\Entity\EntityNG.
EntityTranslation.php in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php
Definition of Drupal\Core\Entity\Type\EntityTranslation.
EntityWrapper.php in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php
Definition of Drupal\Core\Entity\Field\Type\EntityWrapper.
FieldInterface.php in drupal/core/lib/Drupal/Core/Entity/Field/FieldInterface.php
Definition of Drupal\Core\Entity\Field\FieldInterface.
FieldItemBase.php in drupal/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php
Definition of Drupal\Core\Entity\Field\FieldItemBase.

... See full list

File

drupal/core/lib/Drupal/Core/TypedData/ContextAwareInterface.php, line 13
Definition of Drupal\Core\TypedData\ContextAwareInterface.

Namespace

Drupal\Core\TypedData
View source
interface ContextAwareInterface {

  /**
   * Returns the name of a property or item.
   *
   * @return string
   *   If the data is a property of some complex data, the name of the property.
   *   If the data is an item of a list, the name is the numeric position of the
   *   item in the list, starting with 0. Otherwise, NULL is returned.
   */
  public function getName();

  /**
   * Sets the name of a property or item.
   *
   * This method is supposed to be used by the parental data structure in order
   * to provide appropriate context only.
   *
   * @param string $name
   *   The name to set for a property or item.
   *
   * @see ContextAwareInterface::getName()
   */
  public function setName($name);

  /**
   * Returns the parent data structure; i.e. either complex data or a list.
   *
   * @return Drupal\Core\TypedData\ComplexDataInterface|Drupal\Core\TypedData\ListInterface
   *   The parent data structure; either complex data or a list.
   */
  public function getParent();

  /**
   * Sets the parent of a property or item.
   *
   * This method is supposed to be used by the parental data structure in order
   * to provide appropriate context only.
   *
   * @param mixed $parent
   *   The parent data structure; either complex data or a list.
   *
   * @see ContextAwareInterface::getParent()
   */
  public function setParent($parent);

}

Members

Namesort descending Modifiers Type Description Overrides
ContextAwareInterface::getName public function Returns the name of a property or item. 6
ContextAwareInterface::getParent public function Returns the parent data structure; i.e. either complex data or a list. 6
ContextAwareInterface::setName public function Sets the name of a property or item. 6
ContextAwareInterface::setParent public function Sets the parent of a property or item. 6