Same name in other branches
- 8.x-1.x src/Plugin/Field/FieldWidget/ExifHtmlWidget.php \Drupal\exif\Plugin\Field\FieldWidget\ExifHtmlWidget
Plugin implementation of the 'exif_html' widget.
Plugin annotation
@FieldWidget(
id = "exif_html",
label = @Translation("Metadata from image as HTML table"),
description = @Translation("field content is calculated from image field
in the same content type (field are hidden from forms)"), multiple_values
= true, field_types = {
"text",
"text_long",
}
)
Hierarchy
- class \Drupal\exif\Plugin\Field\FieldWidget\ExifWidgetBase extends \Drupal\Core\Field\WidgetBase uses \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\exif\Plugin\Field\FieldWidget\ExifHtmlWidget extends \Drupal\exif\Plugin\Field\FieldWidget\ExifWidgetBase
Expanded class hierarchy of ExifHtmlWidget
Fichier
-
src/
Plugin/ Field/ FieldWidget/ ExifHtmlWidget.php, line 22
Namespace
Drupal\exif\Plugin\Field\FieldWidgetView source
class ExifHtmlWidget extends ExifWidgetBase {
const EXIF_HTML_DEFAULT_SETTINGS = [
'exif_field_separator' => '',
'exif_field' => 'all_all',
];
/**
* {@inheritdoc}
*/
public static function defaultSettings() {
return ExifHtmlWidget::EXIF_HTML_DEFAULT_SETTINGS + parent::defaultSettings();
}
/**
* {@inheritdoc}
*/
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
$element += [
'#type' => '',
'#value' => '',
];
return $element;
}
}