function ComputedTestCacheableStringItem::propertyDefinitions

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

Overrides StringItemBase::propertyDefinitions

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ComputedTestCacheableStringItem.php, line 29

Class

ComputedTestCacheableStringItem
Defines the 'string' entity field type with cacheability metadata.

Namespace

Drupal\entity_test\Plugin\Field\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
  $properties['value'] = DataDefinition::create('computed_test_cacheable_string')->setLabel(new TranslatableMarkup('Text value'))
    ->setSetting('case_sensitive', $field_definition->getSetting('case_sensitive'))
    ->setRequired(TRUE);
  return $properties;
}

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