3 namespace Drupal\Driver\Fields;
6 * Interface for handling fields.
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.
12 interface FieldHandlerInterface {
15 * Expand abstract field values so they can be saved on the entity.
17 * This method takes care of the different ways that field data is saved on
18 * entities in different versions of Drupal.
20 * @param mixed $values
21 * A single value or an array of field values to save on the entity.
24 * An array of field values in the format expected by the entity storage
25 * handlers in the driver's version of Drupal.
27 public function expand($values);