92daf342296ef3851e6e44cdea1a01e7b4cf7045
[yaffs-website] / web / modules / contrib / diff / src / FieldReferenceInterface.php
1 <?php
2
3 namespace Drupal\diff;
4
5 use Drupal\Core\Field\FieldItemListInterface;
6 use Drupal\Core\Plugin\PluginFormInterface;
7 use Drupal\Component\Plugin\ConfigurablePluginInterface;
8
9 /**
10  * Provides referenced entities to recurse in diff.
11  */
12 interface FieldReferenceInterface extends PluginFormInterface, ConfigurablePluginInterface {
13
14   /**
15    * Builds an array of entities.
16    *
17    * This method is responsible for transforming a FieldItemListInterface object
18    * into an array of entities. The resulted array of entities is then used when
19    * parsing the entity to get a clean array of fields that will be compared.
20    *
21    * @param \Drupal\Core\Field\FieldItemListInterface $field_items
22    *   Represents an entity field.
23    *
24    * @return \Drupal\Core\Entity\EntityInterface[]
25    *   An array of entities to be compared. If an empty array is returned it
26    *   means that a field is either empty or no properties need to be compared
27    *   for that field.
28    */
29   public function getEntitiesToDiff(FieldItemListInterface $field_items);
30
31 }