Security update for permissions_by_term
[yaffs-website] / vendor / drupal / drupal-driver / src / Drupal / Driver / Fields / FieldHandlerInterface.php
1 <?php
2
3 namespace Drupal\Driver\Fields;
4
5 /**
6  * Interface for handling fields.
7  *
8  * Saving fields on entities is handled differently depending on the Drupal
9  * version. This interface translates abstract field data into the format that
10  * is expected by the different storage handlers.
11  */
12 interface FieldHandlerInterface {
13
14   /**
15    * Expand abstract field values so they can be saved on the entity.
16    *
17    * This method takes care of the different ways that field data is saved on
18    * entities in different versions of Drupal.
19    *
20    * @param mixed $values
21    *   A single value or an array of field values to save on the entity.
22    *
23    * @return array
24    *   An array of field values in the format expected by the entity storage
25    *   handlers in the driver's version of Drupal.
26    */
27   public function expand($values);
28
29 }