/** * {@inheritdoc} */ 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; }
/** * {@inheritdoc} */ public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties = parent::propertyDefinitions($field_definition); $properties['alt'] = DataDefinition::create('string')->setLabel(t('Alternative text'))->setDescription(t("Alternative image text, for the image's 'alt' attribute.")); $properties['title'] = DataDefinition::create('string')->setLabel(t('Title'))->setDescription(t("Image title text, for the image's 'title' attribute.")); $properties['width'] = DataDefinition::create('integer')->setLabel(t('Width'))->setDescription(t('The width of the image in pixels.')); $properties['height'] = DataDefinition::create('integer')->setLabel(t('Height'))->setDescription(t('The height of the image in pixels.')); return $properties; }