3 namespace Drupal\Core\TypedData;
6 * Interface for complex data definitions.
8 * @see \Drupal\Core\TypedData\ComplexDataInterface
12 interface ComplexDataDefinitionInterface extends DataDefinitionInterface {
15 * Gets the definition of a contained property.
18 * The name of property.
20 * @return \Drupal\Core\TypedData\DataDefinitionInterface|null
21 * The definition of the property or NULL if the property does not exist.
23 public function getPropertyDefinition($name);
26 * Gets an array of property definitions of contained properties.
28 * @return \Drupal\Core\TypedData\DataDefinitionInterface[]
29 * An array of property definitions of contained properties, keyed by
32 public function getPropertyDefinitions();
35 * Returns the name of the main property, if any.
37 * Some field items consist mainly of one main property, e.g. the value of a
38 * text field or the @code target_id @endcode of an entity reference. If the
39 * field item has no main property, the method returns NULL.
42 * The name of the value property, or NULL if there is none.
44 public function getMainPropertyName();