summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/DataReferenceInterface.php
blob: 878c44df746b62ca91eb2ed95d15edd662b1bd43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?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();

}