Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / TypedData / ComplexDataDefinitionInterface.php
1 <?php
2
3 namespace Drupal\Core\TypedData;
4
5 /**
6  * Interface for complex data definitions.
7  *
8  * @see \Drupal\Core\TypedData\ComplexDataInterface
9  *
10  * @ingroup typed_data
11  */
12 interface ComplexDataDefinitionInterface extends DataDefinitionInterface {
13
14   /**
15    * Gets the definition of a contained property.
16    *
17    * @param string $name
18    *   The name of property.
19    *
20    * @return \Drupal\Core\TypedData\DataDefinitionInterface|null
21    *   The definition of the property or NULL if the property does not exist.
22    */
23   public function getPropertyDefinition($name);
24
25   /**
26    * Gets an array of property definitions of contained properties.
27    *
28    * @return \Drupal\Core\TypedData\DataDefinitionInterface[]
29    *   An array of property definitions of contained properties, keyed by
30    *   property name.
31    */
32   public function getPropertyDefinitions();
33
34   /**
35    * Returns the name of the main property, if any.
36    *
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.
40    *
41    * @return string|null
42    *   The name of the value property, or NULL if there is none.
43    */
44   public function getMainPropertyName();
45
46 }