public static function ImageStyleNormalizedFieldItem::propertyDefinitions in JSON:API Image Styles 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldType/ImageStyleNormalizedFieldItem.php \Drupal\jsonapi_image_styles\Plugin\Field\FieldType\ImageStyleNormalizedFieldItem::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
- src/
Plugin/ Field/ FieldType/ ImageStyleNormalizedFieldItem.php, line 32
Class
- ImageStyleNormalizedFieldItem
- Plugin implementation of the 'image_style_uri' field type.
Namespace
Drupal\jsonapi_image_styles\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['url'] = DataDefinition::create('any')
->setLabel(t('URI'))
->setRequired(TRUE);
return $properties;
}