function ShapeItemRequired::propertyDefinitions

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

Overrides ShapeItem::propertyDefinitions

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItemRequired.php, line 21

Class

ShapeItemRequired
Defines the 'shape_required' field type.

Namespace

Drupal\entity_test\Plugin\Field\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
  $properties = parent::propertyDefinitions($field_definition);
  $properties['shape']->setRequired(TRUE);
  return $properties;
}

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