/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:25
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:35
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ComplexDataDefinitionBase
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php:42
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($entity_type_id = null, $bundle = null): static Creates a new entity definition.
/**
* Creates a new entity definition.
*
* @param string $entity_type_id
* (optional) The ID of the entity type, or NULL if the entity type is
* unknown. Defaults to NULL.
* @param string $bundle
* (optional) The bundle of the entity type, or NULL if the bundle is
* unknown. Defaults to NULL.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php:24
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php:154
⧉public getIterator() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php:166
⧉public getEntity(): \Drupal\Core\Entity\EntityInterface Returns the wrapped entity object.
/**
* Returns the wrapped entity object.
*
* @return \Drupal\Core\Entity\EntityInterface
* The wrapped entity object. If the entity is translatable and a specific
* translation is required, always request it by calling ::getTranslation()
* or ::getUntranslated() as the language of the returned object is not
* defined.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php:179
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(Drupal\Core\TypedData\DataDefinitionInterface $definition, $name = null, ?Drupal\Core\TypedData\TypedDataInterface $parent = null) Constructs a TypedData object given its definition and context.
/**
* Constructs a TypedData object given its definition and context.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* The data definition.
* @param string $name
* (optional) The name of the created property, or NULL if it is the root
* of a typed data tree. Defaults to NULL.
* @param \Drupal\Core\TypedData\TypedDataInterface $parent
* (optional) The parent object of the data property, or NULL if it is the
* root of a typed data tree. Defaults to NULL.
*
* @see \Drupal\Core\TypedData\TypedDataManager::create()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:64
⧉public getPluginId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:73
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:80
⧉public getDataDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:87
⧉public setStringTranslation(Drupal\Core\StringTranslation\TranslationInterface $translation): $this Sets the string translation service to use.
/**
* Sets the string translation service to use.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation
* The string translation service.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:118
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:119
⧉public validate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:131
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:147
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:155
⧉public getRoot() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:162
⧉public getPropertyPath() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:173
⧉public getParent() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:195
⧉protected t($string, array $args = array(), array $options = array()): \Drupal\Core\StringTranslation\TranslatableMarkup Translates a string to the current language or to a given language.
/**
* Translates a string to the current language or to a given language.
*
* See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for
* important security information and usage guidelines.
*
* In order for strings to be localized, make them available in one of the
* ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink. When
* possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait
* $this->t(). Otherwise create a new
* \Drupal\Core\StringTranslation\TranslatableMarkup object.
*
* @param string $string
* A string containing the English text to translate.
* @param array $args
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to. See the
* @link i18n Internationalization topic @endlink for more information
* about string contexts.
*
* @return \Drupal\Core\StringTranslation\TranslatableMarkup
* An object that, when cast to a string, returns the translated string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct()
*
* @ingroup sanitization
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
⧉protected formatPlural($count, $singular, $plural, array $args = array(), array $options = array()) Formats a string containing a count of items.
/**
* Formats a string containing a count of items.
*
* @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:79
⧉protected getNumberOfPlurals($langcode = null) Returns the number of plurals supported by a given language.
/**
* Returns the number of plurals supported by a given language.
*
* @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:88
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* Gets the string translation service.
*
* @return \Drupal\Core\StringTranslation\TranslationInterface
* The string translation service.
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:102
⇄⧉public static createFromEntity(Drupal\Core\Entity\EntityInterface $entity): static Creates an instance wrapping the given entity.
/**
* Creates an instance wrapping the given entity.
*
* @param \Drupal\Core\Entity\EntityInterface|null $entity
* The entity object to wrap.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php:48
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:441
⧉public getValue() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:40
⧉public getString() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:89
⧉public get($index) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:101
⧉public set($index, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:111
⧉public removeItem($index) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:133
⧉public first() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:166
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:183
⧉public offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:191
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:199
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:212
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:231
⧉public getIterator() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:239
⧉public count() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:247
⧉public isEmpty() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:254
⧉public filter($callback) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:272
⧉public onChange($delta) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:294
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:304
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(Drupal\Core\TypedData\DataDefinitionInterface $definition, $name = null, ?Drupal\Core\TypedData\TypedDataInterface $parent = null) Constructs a TypedData object given its definition and context.
/**
* Constructs a TypedData object given its definition and context.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* The data definition.
* @param string $name
* (optional) The name of the created property, or NULL if it is the root
* of a typed data tree. Defaults to NULL.
* @param \Drupal\Core\TypedData\TypedDataInterface $parent
* (optional) The parent object of the data property, or NULL if it is the
* root of a typed data tree. Defaults to NULL.
*
* @see \Drupal\Core\TypedData\TypedDataManager::create()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:64
⧉public getPluginId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:73
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:80
⧉public getDataDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:87
⧉public setStringTranslation(Drupal\Core\StringTranslation\TranslationInterface $translation): $this Sets the string translation service to use.
/**
* Sets the string translation service to use.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation
* The string translation service.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:118
⧉public validate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:131
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:40
⧉protected delegateMethod($method): array Calls a method on each FieldItem.
/**
* Calls a method on each FieldItem.
*
* Any argument passed will be forwarded to the invoked method.
*
* @param string $method
* The name of the method to be invoked.
*
* @return array
* An array of results keyed by delta.
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:227
⧉protected defaultValueWidget(Drupal\Core\Form\FormStateInterface $form_state): \Drupal\Core\Field\WidgetInterface|null Returns the widget object used in default value form.
/**
* Returns the widget object used in default value form.
*
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state of the (entire) configuration form.
*
* @return \Drupal\Core\Field\WidgetInterface|null
* A Widget object or NULL if no widget is available.
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:344
⧉protected rekey($from_index0) Renumbers the items in the list.
/**
* Renumbers the items in the list.
*
* @param int $from_index
* Optionally, the index at which to start the renumbering, if it is known
* that items before that can safely be skipped (for example, when removing
* an item at a given index).
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:153
⧉protected t($string, array $args = array(), array $options = array()): \Drupal\Core\StringTranslation\TranslatableMarkup Translates a string to the current language or to a given language.
/**
* Translates a string to the current language or to a given language.
*
* See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for
* important security information and usage guidelines.
*
* In order for strings to be localized, make them available in one of the
* ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink. When
* possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait
* $this->t(). Otherwise create a new
* \Drupal\Core\StringTranslation\TranslatableMarkup object.
*
* @param string $string
* A string containing the English text to translate.
* @param array $args
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to. See the
* @link i18n Internationalization topic @endlink for more information
* about string contexts.
*
* @return \Drupal\Core\StringTranslation\TranslatableMarkup
* An object that, when cast to a string, returns the translated string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct()
*
* @ingroup sanitization
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
⧉protected formatPlural($count, $singular, $plural, array $args = array(), array $options = array()) Formats a string containing a count of items.
/**
* Formats a string containing a count of items.
*
* @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:79
⧉protected getNumberOfPlurals($langcode = null) Returns the number of plurals supported by a given language.
/**
* Returns the number of plurals supported by a given language.
*
* @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:88
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* Gets the string translation service.
*
* @return \Drupal\Core\StringTranslation\TranslationInterface
* The string translation service.
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:102
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:441
⧉public getValue() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:40
⧉public getString() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:89
⧉public get($index) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:101
⧉public set($index, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:111
⧉public removeItem($index) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:133
⧉public first() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:166
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:174
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:183
⧉public offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:191
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:199
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:212
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:231
⧉public getIterator() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:239
⧉public count() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:247
⧉public isEmpty() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:254
⧉public filter($callback) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:272
⧉public onChange($delta) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:294
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:304
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(Drupal\Core\TypedData\DataDefinitionInterface $definition, $name = null, ?Drupal\Core\TypedData\TypedDataInterface $parent = null) Constructs a TypedData object given its definition and context.
/**
* Constructs a TypedData object given its definition and context.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* The data definition.
* @param string $name
* (optional) The name of the created property, or NULL if it is the root
* of a typed data tree. Defaults to NULL.
* @param \Drupal\Core\TypedData\TypedDataInterface $parent
* (optional) The parent object of the data property, or NULL if it is the
* root of a typed data tree. Defaults to NULL.
*
* @see \Drupal\Core\TypedData\TypedDataManager::create()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:64
⧉public getPluginId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:73
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:80
⧉public getDataDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:87
⧉public setStringTranslation(Drupal\Core\StringTranslation\TranslationInterface $translation): $this Sets the string translation service to use.
/**
* Sets the string translation service to use.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation
* The string translation service.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:118
⧉public validate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedData.php:131
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:40
⧉protected delegateMethod($method): array Calls a method on each FieldItem.
/**
* Calls a method on each FieldItem.
*
* Any argument passed will be forwarded to the invoked method.
*
* @param string $method
* The name of the method to be invoked.
*
* @return array
* An array of results keyed by delta.
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:227
⧉protected defaultValueWidget(Drupal\Core\Form\FormStateInterface $form_state): \Drupal\Core\Field\WidgetInterface|null Returns the widget object used in default value form.
/**
* Returns the widget object used in default value form.
*
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form state of the (entire) configuration form.
*
* @return \Drupal\Core\Field\WidgetInterface|null
* A Widget object or NULL if no widget is available.
*/
Inherited from Drupal\Core\Field\FieldItemList
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldItemList.php:344
⧉protected rekey($from_index0) Renumbers the items in the list.
/**
* Renumbers the items in the list.
*
* @param int $from_index
* Optionally, the index at which to start the renumbering, if it is known
* that items before that can safely be skipped (for example, when removing
* an item at a given index).
*/
Inherited from Drupal\Core\TypedData\Plugin\DataType\ItemList
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php:153
⧉protected t($string, array $args = array(), array $options = array()): \Drupal\Core\StringTranslation\TranslatableMarkup Translates a string to the current language or to a given language.
/**
* Translates a string to the current language or to a given language.
*
* See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for
* important security information and usage guidelines.
*
* In order for strings to be localized, make them available in one of the
* ways supported by the
* @link https://www.drupal.org/node/322729 Localization API @endlink. When
* possible, use the \Drupal\Core\StringTranslation\StringTranslationTrait
* $this->t(). Otherwise create a new
* \Drupal\Core\StringTranslation\TranslatableMarkup object.
*
* @param string $string
* A string containing the English text to translate.
* @param array $args
* (optional) An associative array of replacements to make after
* translation. Based on the first character of the key, the value is
* escaped and/or themed. See
* \Drupal\Component\Render\FormattableMarkup::placeholderFormat() for
* details.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'langcode' (defaults to the current language): A language code, to
* translate to a language other than what is used to display the page.
* - 'context' (defaults to the empty context): The context the source
* string belongs to. See the
* @link i18n Internationalization topic @endlink for more information
* about string contexts.
*
* @return \Drupal\Core\StringTranslation\TranslatableMarkup
* An object that, when cast to a string, returns the translated string.
*
* @see \Drupal\Component\Render\FormattableMarkup::placeholderFormat()
* @see \Drupal\Core\StringTranslation\TranslatableMarkup::__construct()
*
* @ingroup sanitization
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:70
⧉protected formatPlural($count, $singular, $plural, array $args = array(), array $options = array()) Formats a string containing a count of items.
/**
* Formats a string containing a count of items.
*
* @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:79
⧉protected getNumberOfPlurals($langcode = null) Returns the number of plurals supported by a given language.
/**
* Returns the number of plurals supported by a given language.
*
* @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:88
⧉protected getStringTranslation(): \Drupal\Core\StringTranslation\TranslationInterface Gets the string translation service.
/**
* Gets the string translation service.
*
* @return \Drupal\Core\StringTranslation\TranslationInterface
* The string translation service.
*/
Inherited from Drupal\Core\TypedData\TypedData
Defined in <ROOT>/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php:102
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (7) "integer"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (4) "uuid"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (8) "language"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (8) "language"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (8) "language"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (6) "string"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (8) "password"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (5) "email"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (6) "string"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (7) "created"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (7) "changed"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (9) "timestamp"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (9) "timestamp"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (5) "email"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (7) "boolean"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (16) "metatag_computed"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (16) "entity_reference"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:85
⧉public getLabel(): string Gets the label of the field type.
/**
* Gets the label of the field type.
*
* If the label hasn't been set, then fall back to the label of the
* typed data definition.
*
* @return string
* The label of the field type.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:101
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public __construct(array $values = array()) Constructs a new data definition object.
/**
* Constructs a new data definition object.
*
* @param array $values
* (optional) If given, an array of initial values to set on the definition.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:46
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:53
⧉public setDataType($type): static Sets the data type.
/**
* Sets the data type.
*
* @param string $type
* The data type to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:66
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:190
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:217
⧉public setSettings(array $settings): static Sets the array of settings, as required by the used class.
/**
* Sets the array of settings, as required by the used class.
*
* @param array $settings
* The array of settings.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:230
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:238
⧉public setSetting($setting_name, $value): static Sets a definition setting.
/**
* Sets a definition setting.
*
* @param string $setting_name
* The definition setting to set.
* @param mixed $value
* The value to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:253
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public __sleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:372
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:382
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
/**
* Creates a new field item definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition the item definition belongs to.
*
* @return static
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php:47
protected type -> string (4) "path"
protected propertyDefinitions -> null
protected schema -> null
protected indexes -> array (0)
⧉public getCacheContexts() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:15
⧉public getCacheTags() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:22
⧉public getCacheMaxAge() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php:29
⧉public getName() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:110
⧉public setName($name): static Sets the field name.
/**
* Sets the field name.
*
* @param string $name
* The field name to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:123
⧉public getType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:131
⧉public getSettings() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:138
/**
* {@inheritdoc}
*
* Note that the method does not unset existing settings not specified in the
* incoming $settings array.
*
* For example:
* @code
* // Given these are the default settings.
* $field_definition->getSettings() === [
* 'fruit' => 'apple',
* 'season' => 'summer',
* ];
* // Change only the 'fruit' setting.
* $field_definition->setSettings(['fruit' => 'banana']);
* // The 'season' setting persists unchanged.
* $field_definition->getSettings() === [
* 'fruit' => 'banana',
* 'season' => 'summer',
* ];
* @endcode
*
* For clarity, it is preferred to use setSetting() if not all available
* settings are supplied.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:167
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:186
⧉public getProvider() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:194
⧉public setProvider($provider): $this Sets the name of the provider of this field.
/**
* Sets the name of the provider of this field.
*
* @param string $provider
* The provider name to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:206
⧉public isTranslatable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:214
⧉public setTranslatable($translatable): $this Sets whether the field is translatable.
/**
* Sets whether the field is translatable.
*
* @param bool $translatable
* Whether the field is translatable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:227
⧉public isRevisionable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:235
⧉public setRevisionable($revisionable): $this Sets whether the field is revisionable.
/**
* Sets whether the field is revisionable.
*
* @param bool $revisionable
* Whether the field is revisionable.
*
* @return $this
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:250
⧉public getCardinality() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:258
⧉public setCardinality($cardinality): $this Sets the maximum number of items allowed for the field.
/**
* Sets the maximum number of items allowed for the field.
*
* Possible values are positive integers or
* FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.
*
* Note that if the entity type that this base field is attached to is
* revisionable and the field has a cardinality higher than 1, the field is
* considered revisionable by default.
*
* @param int $cardinality
* The field cardinality.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:278
⧉public isMultiple() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:286
⧉public setPropertyConstraints($name, array $constraints): static Sets constraints for a given field item property.
/**
* Sets constraints for a given field item property.
*
* Note: this overwrites any existing property constraints. If you need to
* add to the existing constraints, use
* \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints()
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:306
⧉public addPropertyConstraints($name, array $constraints): static Adds constraints for a given field item property.
/**
* Adds constraints for a given field item property.
*
* Adds a constraint to a property of a base field item. e.g.
* @code
* // Limit the field item's value property to the range 0 through 10.
* // e.g. $node->size->value.
* $field->addPropertyConstraints('value', [
* 'Range' => [
* 'min' => 0,
* 'max' => 10,
* ]
* ]);
* @endcode
*
* If you want to add a validation constraint that applies to the
* \Drupal\Core\Field\FieldItemList, use BaseFieldDefinition::addConstraint()
* instead.
*
* Note: passing a new set of options for an existing property constraint will
* overwrite with the new options.
*
* @param string $name
* The name of the property to set constraints for.
* @param array $constraints
* The constraints to set.
*
* @return static
* The object itself for chaining.
*
* @see \Drupal\Core\Field\BaseFieldDefinition::addConstraint()
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:345
⧉public setDisplayOptions($display_context, array $options): static Sets the display options for the field in forms or rendered entities.
/**
* Sets the display options for the field in forms or rendered entities.
*
* This enables generic rendering of the field with widgets / formatters,
* including automated support for "In place editing", and with optional
* configurability in the "Manage display" / "Manage form display" UI screens.
*
* Unless this method is called, the field remains invisible (or requires
* ad-hoc rendering logic).
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param array $options
* An array of display options. Refer to
* \Drupal\Core\Field\FieldDefinitionInterface::getDisplayOptions() for
* a list of supported keys. The options should include at least a 'weight',
* or specify 'region' = 'hidden'. The 'default_widget' /
* 'default_formatter' for the field type will be used if no 'type' is
* specified.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:381
⧉public setDisplayConfigurable($display_context, $configurable): static Sets whether the display for the field can be configured.
/**
* Sets whether the display for the field can be configured.
*
* @param string $display_context
* The display context. Either 'view' or 'form'.
* @param bool $configurable
* Whether the display options can be configured (e.g., via the "Manage
* display" / "Manage form display" UI screens). If TRUE, the options
* specified via getDisplayOptions() act as defaults.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:399
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:476
⧉public getInitialValue(): array Returns the initial value for the field.
/**
* Returns the initial value for the field.
*
* @return array
* The initial value for the field, as a numerically indexed array of items,
* each item being a property/value array (array() for no default value).
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:491
⧉public setInitialValue($value): $this Sets an initial value for the field.
/**
* Sets an initial value for the field.
*
* @param mixed $value
* The initial value for the field. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:510
⧉public getInitialValueFromField(): string|null Returns the name of the field that will be used for getting initial values.
/**
* Returns the name of the field that will be used for getting initial values.
*
* @return string|null
* The field name.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:527
⧉public setInitialValueFromField($field_name, $default_value = null): $this Sets a field that will be used for getting initial values.
/**
* Sets a field that will be used for getting initial values.
*
* @param string $field_name
* The name of the field that will be used for getting initial values.
* @param mixed $default_value
* (optional) The default value for the field, in case the inherited value
* is NULL. This can be either:
* - a literal, in which case it will be assigned to the first property of
* the first item;
* - a numerically indexed array of items, each item being a property/value
* array;
* - a non-numerically indexed array, in which case the array is assumed to
* be a property/value array and used as the first item;
* - an empty array for no initial value.
* If the field being added is required or an entity key, it is recommended
* to provide a default value.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:551
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:623
⧉public setTargetEntityTypeId($entity_type_id): $this Sets the ID of the type of the entity this field is attached to.
/**
* Sets the ID of the type of the entity this field is attached to.
*
* @param string $entity_type_id
* The name of the target entity type to set.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:635
⧉public getTargetBundle() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:643
⧉public setTargetBundle($bundle): $this Sets the bundle this field is defined for.
/**
* Sets the bundle this field is defined for.
*
* @param string|null $bundle
* The bundle, or NULL if the field is not bundle-specific.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:655
⧉public getSchema() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:663
⧉public getColumns() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:690
⧉public hasCustomStorage() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:698
⧉public isBaseField() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:705
⧉public setCustomStorage($custom_storage): $this Sets the storage behavior for this field.
/**
* Sets the storage behavior for this field.
*
* @param bool $custom_storage
* Pass FALSE if the storage takes care of storing the field,
* TRUE otherwise.
*
* @return $this
*
* @throws \LogicException
* Thrown if custom storage is to be set to FALSE for a computed field.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:721
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:746
⧉public isDeleted() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:759
⧉public setDeleted($deleted): $this Sets whether the field storage is deleted.
/**
* Sets whether the field storage is deleted.
*
* @param bool $deleted
* Whether the field storage is deleted.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:771
⧉public getConfig($bundle) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:779
⧉public isStorageRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:790
⧉public setStorageRequired($required): static Sets whether the field storage is required.
/**
* Sets whether the field storage is required.
*
* @param bool $required
* Whether the field storage is required.
*
* @return static
* The object itself for chaining.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:808
⧉public __clone() Magic method: Implements a deep clone.
/**
* Magic method: Implements a deep clone.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:816
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:833
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:50
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:58
⧉public setDataType($type) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:65
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:74
⧉public getItemDefinition() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:92
⧉public setItemDefinition(Drupal\Core\TypedData\DataDefinitionInterface $definition): $this Sets the item definition.
/**
* Sets the item definition.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition
* A list item's data definition.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:104
⧉public setTypedDataManager(Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager): $this Sets the typed data manager.
/**
* Sets the typed data manager.
*
* @param \Drupal\Core\TypedData\TypedDataManagerInterface $typed_data_manager
* The typed data manager.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:25
⧉public getTypedDataManager(): \Drupal\Core\TypedData\TypedDataManagerInterface Gets the typed data manager.
/**
* Gets the typed data manager.
*
* @return \Drupal\Core\TypedData\TypedDataManagerInterface
* The typed data manager.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/TypedDataTrait.php:36
⧉public getLabel() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:74
⧉public setLabel($label): static Sets the human-readable label.
/**
* Sets the human-readable label.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $label
* The label to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:87
⧉public getDescription() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:95
⧉public setDescription($description): static Sets the human-readable description.
/**
* Sets the human-readable description.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $description
* The description to set.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:108
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:116
⧉public isReadOnly() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:123
⧉public setReadOnly($read_only): static Sets whether the data is read-only.
/**
* Sets whether the data is read-only.
*
* @param bool $read_only
* Whether the data is read-only.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:140
⧉public isComputed() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:148
⧉public setComputed($computed): static Sets whether the data is computed.
/**
* Sets whether the data is computed.
*
* @param bool $computed
* Whether the data is computed.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:161
⧉public isRequired() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:169
⧉public setRequired($required): static Sets whether the data is required.
/**
* Sets whether the data is required.
*
* @param bool $required
* Whether the data is required.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:182
⧉public setClass($class): static Sets the class used for creating the typed data object.
/**
* Sets the class used for creating the typed data object.
*
* @param string|null $class
* The class to use.
*
* @return static
* The object itself for chaining.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:209
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:261
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:283
⧉public setConstraints(array $constraints): $this Sets an array of validation constraints.
/**
* Sets an array of validation constraints.
*
* @param array $constraints
* An array of validation constraint definitions, keyed by constraint name.
* Each constraint definition can be used for instantiating
* \Symfony\Component\Validator\Constraint objects.
*
* @return $this
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:298
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:318
⧉public & offsetGet($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:331
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:345
⧉public offsetUnset($offset) {@inheritdoc}
/**
* {@inheritdoc}
*
* This is for BC support only.
* @todo Remove in https://www.drupal.org/node/1928868.
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:356
⧉public toArray(): array Returns all definition values as array.
/**
* Returns all definition values as array.
*
* @return array
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:365
⧉public setInternal($internal): $this Sets the whether the data value should be internal.
/**
* Sets the whether the data value should be internal.
*
* @param bool $internal
* Whether the data value should be internal.
*
* @return $this
*
* @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal
*/
Inherited from Drupal\Core\TypedData\DataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/DataDefinition.php:400
⇄⧉public static create($type): static Creates a new field definition.
/**
* Creates a new field definition.
*
* @param string $type
* The type of the field.
*
* @return static
* A new field definition object.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:57
⇄⧉public static createFromFieldStorageDefinition(Drupal\Core\Field\FieldStorageDefinitionInterface $definition): $this Creates a new field definition based upon a field storage definition.
/**
* Creates a new field definition based upon a field storage definition.
*
* In cases where one needs a field storage definitions to act like full
* field definitions, this creates a new field definition based upon the
* (limited) information available. That way it is possible to use the field
* definition in places where a full field definition is required; e.g., with
* widgets or formatters.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition
* The field storage definition to base the new field definition upon.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/BaseFieldDefinition.php:83
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\TypedData\ListDataDefinition
Defined in <ROOT>/core/lib/Drupal/Core/TypedData/ListDataDefinition.php:33
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* Constructs a FieldConfig object.
*
* In most cases, Field entities are created via
* FieldConfig::create($values), where $values is the same
* parameter as in this constructor.
*
* @param array $values
* An array of field properties, keyed by property name. The
* storage associated with the field can be specified either with:
* - field_storage: the FieldStorageConfigInterface object,
* or by referring to an existing field storage in the current configuration
* with:
* - field_name: The field name.
* - entity_type: The entity type.
* Additionally, a 'bundle' property is required to indicate the entity
* bundle to which the field is attached to. Other array elements will be
* used to set the corresponding properties on the class; see the class
* property documentation for details.
* @param string $entity_type
* (optional) The entity type on which the field should be created.
* Defaults to "field_config".
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:108
/**
* Overrides \Drupal\Core\Entity\Entity::preSave().
*
* @throws \Drupal\Core\Field\FieldException
* If the field definition is invalid.
* @throws \Drupal\Core\Entity\EntityStorageException
* In case of failures at the configuration storage level.
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:461
⧉public __sleep() Implements the magic __sleep() method.
/**
* Implements the magic __sleep() method.
*
* Using the Serialize interface and serialize() / unserialize() methods
* breaks entity forms in PHP 5.4.
* @todo Investigate in https://www.drupal.org/node/1977206.
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:473
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:504
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:517
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:524
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:534
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:609
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:624
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* Overrides Entity::isNew().
*
* EntityInterface::enforceIsNew() is only supported for newly created
* configuration entities but has no effect after saving, since each
* configuration entity is unique.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:163
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:180
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:187
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:195
⧉public status() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:203
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:210
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:217
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:224
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:249
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:402
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:411
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:440
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:454
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:461
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:510
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:518
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:530
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:537
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:550
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:591
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:598
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:606
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:613
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
⧉public traitSleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* Adds a dependency.
*
* @param string $type
* Type of dependency being added: 'module', 'theme', 'config', 'content'.
* @param string $name
* If $type is 'module' or 'theme', the name of the module or theme. If
* $type is 'config' or 'content', the result of
* EntityInterface::getConfigDependencyName().
*
* @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
*
* @return $this
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* Calculates and returns dependencies of a specific plugin instance.
*
* Dependencies are added for the module that provides the plugin, as well
* as any dependencies declared by the instance's calculateDependencies()
* method, if it implements
* \Drupal\Component\Plugin\DependentPluginInterface.
*
* @param \Drupal\Component\Plugin\PluginInspectionInterface $instance
* The plugin instance.
*
* @return array
* An array of dependencies keyed by the type of dependency.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/**
* Adds multiple dependencies.
*
* @param array $dependencies
* An array of dependencies keyed by the type of dependency. One example:
* @code
* [
* 'module' => [
* 'node',
* 'field',
* 'image',
* ],
* ];
* @endcode
*
* @see \Drupal\Core\Entity\DependencyTrait::addDependency
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* Calculates and adds dependencies of a specific plugin instance.
*
* Dependencies are added for the module that provides the plugin, as well
* as any dependencies declared by the instance's calculateDependencies()
* method, if it implements
* \Drupal\Component\Plugin\DependentPluginInterface.
*
* @param \Drupal\Component\Plugin\PluginInspectionInterface $instance
* The plugin instance.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* Wraps the module handler.
*
* @return \Drupal\Core\Extension\ModuleHandlerInterface
* The module handler.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* Wraps the theme handler.
*
* @return \Drupal\Core\Extension\ThemeHandlerInterface
* The theme handler.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* Gets the typed config manager.
*
* @return \Drupal\Core\Config\TypedConfigManagerInterface
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:284
/**
* Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
*
* Note that this function should only be called from implementations of
* \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(),
* as dependencies are recalculated during every entity save.
*
* @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency()
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:426
/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:488
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* Sets cacheability; useful for value object constructors.
*
* @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability
* The cacheability to set.
*
* @return $this
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* Gets the entity type manager.
*
* @return \Drupal\Core\Entity\EntityTypeManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* Gets the entity type bundle info service.
*
* @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* Gets the language manager.
*
* @return \Drupal\Core\Language\LanguageManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* Gets the UUID generator.
*
* @return \Drupal\Component\Uuid\UuidInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* The list cache tags to invalidate for this entity.
*
* @return string[]
* Set of list cache tags.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* Loads a field config entity based on the entity type and field name.
*
* @param string $entity_type_id
* ID of the entity type.
* @param string $bundle
* Bundle name.
* @param string $field_name
* Name of the field.
*
* @return \Drupal\field\FieldConfigInterface|null
* The field config entity if one exists for the provided field
* name, otherwise NULL.
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:495
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* Helper callback for uasort() to sort configuration entities by weight and label.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:235
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:498
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* Gets the configuration manager.
*
* @return \Drupal\Core\Config\ConfigManager
* The configuration manager.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:584
protected description -> string (76) "Please provide the name of the person who has referred you to CounsellingBC."
⧉protected settings -> array (2)
handler => string (12) "default:user"
⧉handler_settings => array (5) Depth Limit
protected required -> boolean false
protected translatable -> boolean false
protected default_value -> array (0)
protected default_value_callback -> string (0) ""
protected fieldStorage -> null
protected itemDefinition -> null
protected constraints -> array (0)
protected propertyConstraints -> array (0)
protected deleted -> boolean false
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* Constructs a FieldConfig object.
*
* In most cases, Field entities are created via
* FieldConfig::create($values), where $values is the same
* parameter as in this constructor.
*
* @param array $values
* An array of field properties, keyed by property name. The
* storage associated with the field can be specified either with:
* - field_storage: the FieldStorageConfigInterface object,
* or by referring to an existing field storage in the current configuration
* with:
* - field_name: The field name.
* - entity_type: The entity type.
* Additionally, a 'bundle' property is required to indicate the entity
* bundle to which the field is attached to. Other array elements will be
* used to set the corresponding properties on the class; see the class
* property documentation for details.
* @param string $entity_type
* (optional) The entity type on which the field should be created.
* Defaults to "field_config".
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:108
/**
* Overrides \Drupal\Core\Entity\Entity::preSave().
*
* @throws \Drupal\Core\Field\FieldException
* If the field definition is invalid.
* @throws \Drupal\Core\Entity\EntityStorageException
* In case of failures at the configuration storage level.
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:461
⧉public __sleep() Implements the magic __sleep() method.
/**
* Implements the magic __sleep() method.
*
* Using the Serialize interface and serialize() / unserialize() methods
* breaks entity forms in PHP 5.4.
* @todo Investigate in https://www.drupal.org/node/1977206.
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:473
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:504
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:517
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:524
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:534
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:609
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:624
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* Overrides Entity::isNew().
*
* EntityInterface::enforceIsNew() is only supported for newly created
* configuration entities but has no effect after saving, since each
* configuration entity is unique.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:163
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:180
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:187
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:195
⧉public status() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:203
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:210
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:217
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:224
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:249
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:402
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:411
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:440
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:454
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:461
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:510
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:518
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:530
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:537
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:550
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:591
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:598
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:606
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:613
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
⧉public traitSleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* Adds a dependency.
*
* @param string $type
* Type of dependency being added: 'module', 'theme', 'config', 'content'.
* @param string $name
* If $type is 'module' or 'theme', the name of the module or theme. If
* $type is 'config' or 'content', the result of
* EntityInterface::getConfigDependencyName().
*
* @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
*
* @return $this
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* Calculates and returns dependencies of a specific plugin instance.
*
* Dependencies are added for the module that provides the plugin, as well
* as any dependencies declared by the instance's calculateDependencies()
* method, if it implements
* \Drupal\Component\Plugin\DependentPluginInterface.
*
* @param \Drupal\Component\Plugin\PluginInspectionInterface $instance
* The plugin instance.
*
* @return array
* An array of dependencies keyed by the type of dependency.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/**
* Adds multiple dependencies.
*
* @param array $dependencies
* An array of dependencies keyed by the type of dependency. One example:
* @code
* [
* 'module' => [
* 'node',
* 'field',
* 'image',
* ],
* ];
* @endcode
*
* @see \Drupal\Core\Entity\DependencyTrait::addDependency
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* Calculates and adds dependencies of a specific plugin instance.
*
* Dependencies are added for the module that provides the plugin, as well
* as any dependencies declared by the instance's calculateDependencies()
* method, if it implements
* \Drupal\Component\Plugin\DependentPluginInterface.
*
* @param \Drupal\Component\Plugin\PluginInspectionInterface $instance
* The plugin instance.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* Wraps the module handler.
*
* @return \Drupal\Core\Extension\ModuleHandlerInterface
* The module handler.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* Wraps the theme handler.
*
* @return \Drupal\Core\Extension\ThemeHandlerInterface
* The theme handler.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* Gets the typed config manager.
*
* @return \Drupal\Core\Config\TypedConfigManagerInterface
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:284
/**
* Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
*
* Note that this function should only be called from implementations of
* \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(),
* as dependencies are recalculated during every entity save.
*
* @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency()
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:426
/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:488
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* Sets cacheability; useful for value object constructors.
*
* @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability
* The cacheability to set.
*
* @return $this
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* Gets the entity type manager.
*
* @return \Drupal\Core\Entity\EntityTypeManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* Gets the entity type bundle info service.
*
* @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* Gets the language manager.
*
* @return \Drupal\Core\Language\LanguageManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* Gets the UUID generator.
*
* @return \Drupal\Component\Uuid\UuidInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* The list cache tags to invalidate for this entity.
*
* @return string[]
* Set of list cache tags.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* Loads a field config entity based on the entity type and field name.
*
* @param string $entity_type_id
* ID of the entity type.
* @param string $bundle
* Bundle name.
* @param string $field_name
* Name of the field.
*
* @return \Drupal\field\FieldConfigInterface|null
* The field config entity if one exists for the provided field
* name, otherwise NULL.
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:495
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* Helper callback for uasort() to sort configuration entities by weight and label.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:235
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:498
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* Gets the configuration manager.
*
* @return \Drupal\Core\Config\ConfigManager
* The configuration manager.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:584
⧉public __construct(array $values, $entity_type = 'field_config') Constructs a FieldConfig object.
/**
* Constructs a FieldConfig object.
*
* In most cases, Field entities are created via
* FieldConfig::create($values), where $values is the same
* parameter as in this constructor.
*
* @param array $values
* An array of field properties, keyed by property name. The
* storage associated with the field can be specified either with:
* - field_storage: the FieldStorageConfigInterface object,
* or by referring to an existing field storage in the current configuration
* with:
* - field_name: The field name.
* - entity_type: The entity type.
* Additionally, a 'bundle' property is required to indicate the entity
* bundle to which the field is attached to. Other array elements will be
* used to set the corresponding properties on the class; see the class
* property documentation for details.
* @param string $entity_type
* (optional) The entity type on which the field should be created.
* Defaults to "field_config".
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:108
/**
* Overrides \Drupal\Core\Entity\Entity::preSave().
*
* @throws \Drupal\Core\Field\FieldException
* If the field definition is invalid.
* @throws \Drupal\Core\Entity\EntityStorageException
* In case of failures at the configuration storage level.
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:163
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:461
⧉public __sleep() Implements the magic __sleep() method.
/**
* Implements the magic __sleep() method.
*
* Using the Serialize interface and serialize() / unserialize() methods
* breaks entity forms in PHP 5.4.
* @todo Investigate in https://www.drupal.org/node/1977206.
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:473
⧉public getDataType() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:504
⧉public isList() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:517
⧉public getClass() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:524
⧉public getConstraints() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:534
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:609
⧉public isInternal() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:624
⧉public setSyncing($syncing) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⧉public isSyncing() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
⧉public getOriginalId() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:125
⧉public setOriginalId($id) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:132
⧉public isNew() Overrides Entity::isNew().
/**
* Overrides Entity::isNew().
*
* EntityInterface::enforceIsNew() is only supported for newly created
* configuration entities but has no effect after saving, since each
* configuration entity is unique.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:149
⧉public get($property_name) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:156
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:163
⧉public enable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:180
⧉public disable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:187
⧉public setStatus($status) {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:195
⧉public status() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:203
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:210
⧉public isUninstalling() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:217
⧉public createDuplicate() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:224
⧉public toArray() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:249
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:402
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:411
⧉public getDependencies() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:440
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:454
⧉public getConfigTarget() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:461
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:510
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:518
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:530
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:537
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:550
⧉public isInstallable() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:591
⧉public trustData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:598
⧉public hasTrustedData() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:606
⧉public save() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:613
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
⧉public traitSleep() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
⧉public uuid() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:113
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:278
⧉protected addDependencyTrait($type, $name): $this Adds a dependency.
/**
* Adds a dependency.
*
* @param string $type
* Type of dependency being added: 'module', 'theme', 'config', 'content'.
* @param string $name
* If $type is 'module' or 'theme', the name of the module or theme. If
* $type is 'config' or 'content', the result of
* EntityInterface::getConfigDependencyName().
*
* @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
*
* @return $this
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:31
⧉protected getPluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance): array Calculates and returns dependencies of a specific plugin instance.
/**
* Calculates and returns dependencies of a specific plugin instance.
*
* Dependencies are added for the module that provides the plugin, as well
* as any dependencies declared by the instance's calculateDependencies()
* method, if it implements
* \Drupal\Component\Plugin\DependentPluginInterface.
*
* @param \Drupal\Component\Plugin\PluginInspectionInterface $instance
* The plugin instance.
*
* @return array
* An array of dependencies keyed by the type of dependency.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:33
/**
* Adds multiple dependencies.
*
* @param array $dependencies
* An array of dependencies keyed by the type of dependency. One example:
* @code
* [
* 'module' => [
* 'node',
* 'field',
* 'image',
* ],
* ];
* @endcode
*
* @see \Drupal\Core\Entity\DependencyTrait::addDependency
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/DependencyTrait.php:64
⧉protected calculatePluginDependencies(Drupal\Component\Plugin\PluginInspectionInterface $instance) Calculates and adds dependencies of a specific plugin instance.
/**
* Calculates and adds dependencies of a specific plugin instance.
*
* Dependencies are added for the module that provides the plugin, as well
* as any dependencies declared by the instance's calculateDependencies()
* method, if it implements
* \Drupal\Component\Plugin\DependentPluginInterface.
*
* @param \Drupal\Component\Plugin\PluginInspectionInterface $instance
* The plugin instance.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:88
⧉protected moduleHandler(): \Drupal\Core\Extension\ModuleHandlerInterface Wraps the module handler.
/**
* Wraps the module handler.
*
* @return \Drupal\Core\Extension\ModuleHandlerInterface
* The module handler.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:98
⧉protected themeHandler(): \Drupal\Core\Extension\ThemeHandlerInterface Wraps the theme handler.
/**
* Wraps the theme handler.
*
* @return \Drupal\Core\Extension\ThemeHandlerInterface
* The theme handler.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:108
⧉protected getTypedConfig(): \Drupal\Core\Config\TypedConfigManagerInterface Gets the typed config manager.
/**
* Gets the typed config manager.
*
* @return \Drupal\Core\Config\TypedConfigManagerInterface
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:284
/**
* Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
*
* Note that this function should only be called from implementations of
* \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies(),
* as dependencies are recalculated during every entity save.
*
* @see \Drupal\Core\Config\Entity\ConfigEntityDependency::hasDependency()
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:426
/**
* {@inheritdoc}
*
* Override to never invalidate the entity's cache tag; the config system
* already invalidates it.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:488
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* Sets cacheability; useful for value object constructors.
*
* @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability
* The cacheability to set.
*
* @return $this
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* Gets the entity type manager.
*
* @return \Drupal\Core\Entity\EntityTypeManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* Gets the entity type bundle info service.
*
* @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* Gets the language manager.
*
* @return \Drupal\Core\Language\LanguageManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* Gets the UUID generator.
*
* @return \Drupal\Component\Uuid\UuidInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* The list cache tags to invalidate for this entity.
*
* @return string[]
* Set of list cache tags.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:461
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:235
⇄⧉public static loadByName($entity_type_id, $bundle, $field_name): \Drupal\field\FieldConfigInterface|null Loads a field config entity based on the entity type and field name.
/**
* Loads a field config entity based on the entity type and field name.
*
* @param string $entity_type_id
* ID of the entity type.
* @param string $bundle
* Bundle name.
* @param string $field_name
* Name of the field.
*
* @return \Drupal\field\FieldConfigInterface|null
* The field config entity if one exists for the provided field
* name, otherwise NULL.
*/
Defined in <ROOT>/core/modules/field/src/Entity/FieldConfig.php:377
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldConfigBase.php:495
⇄⧉public static sort(Drupal\Core\Config\Entity\ConfigEntityInterface $a, Drupal\Core\Config\Entity\ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label.
/**
* Helper callback for uasort() to sort configuration entities by weight and label.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:235
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:519
⧉protected static normalizeValue(&$value, $main_property_name): array Ensure a field value is transformed into a format keyed by delta.
/**
* Ensure a field value is transformed into a format keyed by delta.
*
* @param mixed $value
* The raw field value to normalize.
* @param string $main_property_name
* The main field property name.
*
* @return array
* A field value normalized into a format keyed by delta.
*/
Inherited from Drupal\Core\Field\FieldConfigBase
Defined in <ROOT>/core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php:26
/**
* {@inheritdoc}
*
* Override to never invalidate the individual entities' cache tags; the
* config system already invalidates them.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:498
⧉protected static getConfigManager(): \Drupal\Core\Config\ConfigManager Gets the configuration manager.
/**
* Gets the configuration manager.
*
* @return \Drupal\Core\Config\ConfigManager
* The configuration manager.
*/
Inherited from Drupal\Core\Config\Entity\ConfigEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:584
⇄⧉public getChangedTimeAcrossTranslations(): int Returns the timestamp of the last entity change across all translations.
$0->getChangedTimeAcrossTranslations()
/**
* Returns the timestamp of the last entity change across all translations.
*
* @return int
* The timestamp of the last entity save operation across all
* translations.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:17
⇄⧉public getChangedTime(): int|null Gets the timestamp of the last entity change for the current translation.
$0->getChangedTime()
/**
* Gets the timestamp of the last entity change for the current translation.
*
* @return int|null
* The timestamp of the last entity save operation. Some entities allow a
* NULL value indicating the changed time is unknown.
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:33
⇄⧉public setChangedTime($timestamp): $this Sets the timestamp of the last entity change for the current translation.
$0->setChangedTime($timestamp)
/**
* Sets the timestamp of the last entity change for the current translation.
*
* @param int $timestamp
* The timestamp of the last entity save operation.
*
* @return $this
*/
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangedTrait.php:46
⇄⧉public isNew() {@inheritdoc}
$0->isNew()
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:82
⇄⧉public label() {@inheritdoc}
$0->label()
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:89
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:22
⇄⧉public isSyncing() {@inheritdoc}
$0->isSyncing()
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/SynchronizableEntityTrait.php:31
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:419
⇄⧉public setDefaultTranslationEnforced(?bool $enforce_default_translation): static Set or clear an override of the isDefaultTranslation() result.
/**
* Set or clear an override of the isDefaultTranslation() result.
*
* @param bool|null $enforce_default_translation
* If boolean value is passed, the value will override the result of
* isDefaultTranslation() method. If NULL is passed, the default logic will
* be used.
*
* @return $this
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:434
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1040
⇄⧉public updateOriginalValues() Updates the original values with the interim changes.
$0->updateOriginalValues()
/**
* Updates the original values with the interim changes.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1057
⧉public & __get($name) Implements the magic method for getting object properties.
/**
* Implements the magic method for getting object properties.
*
* @todo A lot of code still uses non-fields (e.g. $entity->content in view
* builders) by reference. Clean that up.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1077
⧉public __set($name, $value) Implements the magic method for setting object properties.
/**
* Implements the magic method for setting object properties.
*
* Uses default language always.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1104
⧉public __isset($name) Implements the magic method for isset().
/**
* Implements the magic method for isset().
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1138
⧉public __unset($name) Implements the magic method for unset().
/**
* Implements the magic method for unset().
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1147
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1178
⇄⧉public __clone() Magic method: Implements a deep clone.
clone $0
/**
* Magic method: Implements a deep clone.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1207
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:15
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:31
⇄⧉public traitSleep() {@inheritdoc}
$0->traitSleep()
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:33
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:41
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php:51
⧉public __wakeup() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php:74
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:662
⧉protected getRoleStorage(): \Drupal\user\RoleStorageInterface Returns the role storage object.
/**
* Returns the role storage object.
*
* @return \Drupal\user\RoleStorageInterface
* The role storage object.
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:579
⧉protected traitGetFieldsToSkipFromTranslationChangesCheck(Drupal\Core\Entity\ContentEntityInterface $entity): string[] Returns an array of field names to skip when checking for changes.
/**
* Returns an array of field names to skip when checking for changes.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* A content entity object.
*
* @return string[]
* An array of field names.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityChangesDetectionTrait.php:21
⧉protected getLanguages() {@inheritdoc}
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:280
⧉protected clearTranslationCache() Clears entity translation object cache to remove stale references.
/**
* Clears entity translation object cache to remove stale references.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:540
⧉protected getTranslatedField($name, $langcode): \Drupal\Core\Field\FieldItemListInterface Gets a translated field.
/**
* Gets a translated field.
*
* @return \Drupal\Core\Field\FieldItemListInterface
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:607
⧉protected setDefaultLangcode() Populates the local cache for the default language code.
/**
* Populates the local cache for the default language code.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:767
⧉protected updateFieldLangcodes($langcode) Updates language for already instantiated fields.
/**
* Updates language for already instantiated fields.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:800
⧉protected initializeTranslation($langcode): \Drupal\Core\Entity\EntityInterface Instantiates a translation object for an existing translation.
/**
* Instantiates a translation object for an existing translation.
*
* The translated entity will be a clone of the current entity with the
* specified $langcode. All translations share the same field data structures
* to ensure that all of them deal with fresh data.
*
* @param string $langcode
* The language code for the requested translation.
*
* @return \Drupal\Core\Entity\EntityInterface
* The translation object. The content properties of the translation object
* are stored as references to the main entity.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:930
⧉protected getEntityKey($key): mixed Gets the value of the given entity key, if defined.
/**
* Gets the value of the given entity key, if defined.
*
* @param string $key
* Name of the entity key, for example id, revision or bundle.
*
* @return mixed
* The value of the entity key, NULL if not defined.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1329
⧉protected getFieldsToSkipFromTranslationChangesCheck(): array Returns an array of field names to skip in ::hasTranslationChanges.
/**
* Returns an array of field names to skip in ::hasTranslationChanges.
*
* @return array
* An array of field names.
*/
Inherited from Drupal\Core\Entity\ContentEntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/ContentEntityBase.php:1431
⧉protected setCacheability(Drupal\Core\Cache\CacheableDependencyInterface $cacheability): $this Sets cacheability; useful for value object constructors.
/**
* Sets cacheability; useful for value object constructors.
*
* @param \Drupal\Core\Cache\CacheableDependencyInterface $cacheability
* The cacheability to set.
*
* @return $this
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php:39
⧉protected entityTypeManager(): \Drupal\Core\Entity\EntityTypeManagerInterface Gets the entity type manager.
/**
* Gets the entity type manager.
*
* @return \Drupal\Core\Entity\EntityTypeManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:72
⧉protected entityTypeBundleInfo(): \Drupal\Core\Entity\EntityTypeBundleInfoInterface Gets the entity type bundle info service.
/**
* Gets the entity type bundle info service.
*
* @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:81
⧉protected languageManager(): \Drupal\Core\Language\LanguageManagerInterface Gets the language manager.
/**
* Gets the language manager.
*
* @return \Drupal\Core\Language\LanguageManagerInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:90
⧉protected uuidGenerator(): \Drupal\Component\Uuid\UuidInterface Gets the UUID generator.
/**
* Gets the UUID generator.
*
* @return \Drupal\Component\Uuid\UuidInterface
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:99
⧉protected linkTemplates(): array Gets an array link templates.
/**
* Gets an array link templates.
*
* @return array
* An array of link templates containing paths.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:248
⧉protected urlRouteParameters($rel): array Gets an array of placeholders for this entity.
/**
* Gets an array of placeholders for this entity.
*
* Individual entity classes may override this method to add additional
* placeholders if desired. If so, they should be sure to replicate the
* property caching logic.
*
* @param string $rel
* The link relationship type, for example: canonical or edit-form.
*
* @return array
* An array of URI placeholders.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:278
⧉protected getListCacheTagsToInvalidate(): string[] The list cache tags to invalidate for this entity.
/**
* The list cache tags to invalidate for this entity.
*
* @return string[]
* Set of list cache tags.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:461
⧉protected invalidateTagsOnSave($update) Invalidates an entity's cache tags upon save.
/**
* Invalidates an entity's cache tags upon save.
*
* @param bool $update
* TRUE if the entity has been updated, or FALSE if it has been inserted.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:532
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:160
⇄⧉public static getAnonymousUser(): \Drupal\user\UserInterface Returns an anonymous user entity.
\Drupal\user\Entity\User::getAnonymousUser()
/**
* Returns an anonymous user entity.
*
* @return \Drupal\user\UserInterface
* An anonymous user entity.
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:438
/**
* {@inheritdoc}
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:461
⇄⧉public static getAllowedTimezones(): string[] Defines allowed timezones for the field's AllowedValues constraint.
\Drupal\user\Entity\User::getAllowedTimezones()
/**
* Defines allowed timezones for the field's AllowedValues constraint.
*
* @return string[]
* The allowed values.
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:589
⇄⧉public static getAllowedConfigurableLanguageCodes(): string[] Defines allowed configurable language codes for AllowedValues constraints.
/**
* Defines allowed configurable language codes for AllowedValues constraints.
*
* @return string[]
* The allowed values.
*/
Defined in <ROOT>/core/modules/user/src/Entity/User.php:599
/**
* {@inheritdoc}
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:509
⧉protected static invalidateTagsOnDelete(Drupal\Core\Entity\EntityTypeInterface $entity_type, array $entities) Invalidates an entity's cache tags upon delete.
/**
* Invalidates an entity's cache tags upon delete.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Entity\EntityInterface[] $entities
* An array of entities.
*/
Inherited from Drupal\Core\Entity\EntityBase
Defined in <ROOT>/core/lib/Drupal/Core/Entity/EntityBase.php:557