function ShapeItem::propertyDefinitions

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItem.php \Drupal\entity_test\Plugin\Field\FieldType\ShapeItem::propertyDefinitions()
  2. 8.9.x core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItem.php \Drupal\entity_test\Plugin\Field\FieldType\ShapeItem::propertyDefinitions()
  3. 10 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItem.php \Drupal\entity_test\Plugin\Field\FieldType\ShapeItem::propertyDefinitions()

Overrides FieldItemInterface::propertyDefinitions

1 call to ShapeItem::propertyDefinitions()
ShapeItemRequired::propertyDefinitions in core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItemRequired.php
Defines field item properties.
1 method overrides ShapeItem::propertyDefinitions()
ShapeItemRequired::propertyDefinitions in core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItemRequired.php
Defines field item properties.

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItem.php, line 33

Class

ShapeItem
Defines the 'shape' field type.

Namespace

Drupal\entity_test\Plugin\Field\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
    $properties['shape'] = DataDefinition::create('string')->setLabel(t('Shape'));
    $properties['color'] = DataDefinition::create('string')->setLabel(t('Color'));
    return $properties;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.