interface DataReferenceInterface

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/DataReferenceInterface.php \Drupal\Core\TypedData\DataReferenceInterface
  2. 10 core/lib/Drupal/Core/TypedData/DataReferenceInterface.php \Drupal\Core\TypedData\DataReferenceInterface
  3. 11.x core/lib/Drupal/Core/TypedData/DataReferenceInterface.php \Drupal\Core\TypedData\DataReferenceInterface

Interface for typed data references.

Hierarchy

Expanded class hierarchy of DataReferenceInterface

All classes that implement DataReferenceInterface

See also

\Drupal\Core\TypedData\DataReferenceDefinitionInterface

File

core/lib/Drupal/Core/TypedData/DataReferenceInterface.php, line 10

Namespace

Drupal\Core\TypedData
View source
interface DataReferenceInterface {
    
    /**
     * Gets the referenced data.
     *
     * @return \Drupal\Core\TypedData\TypedDataInterface|null
     *   The referenced typed data object, or NULL if the reference is unset.
     */
    public function getTarget();
    
    /**
     * Gets the identifier of the referenced data.
     *
     * @return int|string|null
     *   The identifier of the referenced data, or NULL if the reference is unset.
     */
    public function getTargetIdentifier();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
DataReferenceInterface::getTarget public function Gets the referenced data. 1
DataReferenceInterface::getTargetIdentifier public function Gets the identifier of the referenced data. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.