DataReferenceInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/TypedData/DataReferenceInterface.php
  2. 8.9.x core/lib/Drupal/Core/TypedData/DataReferenceInterface.php
  3. 10 core/lib/Drupal/Core/TypedData/DataReferenceInterface.php

Namespace

Drupal\Core\TypedData

File

core/lib/Drupal/Core/TypedData/DataReferenceInterface.php

View source
<?php

namespace Drupal\Core\TypedData;


/**
 * Interface for typed data references.
 *
 * @see \Drupal\Core\TypedData\DataReferenceDefinitionInterface
 */
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();

}

Interfaces

Title Deprecated Summary
DataReferenceInterface Interface for typed data references.

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