public static function VideoItem::propertyDefinitions in Video 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/VideoItem.php \Drupal\video\Plugin\Field\FieldType\VideoItem::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 FileItem::propertyDefinitions
See also
\Drupal\Core\Field\BaseFieldDefinition
File
- src/
Plugin/ Field/ FieldType/ VideoItem.php, line 105
Class
- VideoItem
- Plugin implementation of the 'video' field type.
Namespace
Drupal\video\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties = parent::propertyDefinitions($field_definition);
// unset the default values from the file module
unset($properties['display']);
unset($properties['description']);
$properties['data'] = DataDefinition::create('string')
->setLabel(t('Additional video metadata'))
->setDescription(t("Additional metadata for the uploadded or embedded video."));
return $properties;
}