public static function LayoutSectionItem::propertyDefinitions in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php \Drupal\layout_builder\Plugin\Field\FieldType\LayoutSectionItem::propertyDefinitions()
- 10 core/modules/layout_builder/src/Plugin/Field/FieldType/LayoutSectionItem.php \Drupal\layout_builder\Plugin\Field\FieldType\LayoutSectionItem::propertyDefinitions()
Defines field item properties.
Properties that are required to constitute a valid, non-empty item should be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired().
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name.
Overrides FieldItemInterface::propertyDefinitions
See also
\Drupal\Core\Field\BaseFieldDefinition
File
- core/
modules/ layout_builder/ src/ Plugin/ Field/ FieldType/ LayoutSectionItem.php, line 34
Class
- LayoutSectionItem
- Plugin implementation of the 'layout_section' field type.
Namespace
Drupal\layout_builder\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['section'] = DataDefinition::create('layout_section')
->setLabel(new TranslatableMarkup('Layout Section'))
->setRequired(FALSE);
return $properties;
}