Same name and namespace in other branches
- 8.x-2.x src/Plugin/Field/FieldWidget/ExifHtmlWidget.php \Drupal\exif\Plugin\Field\FieldWidget\ExifHtmlWidget 1 comment
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
- class \Drupal\exif\Plugin\Field\FieldWidget\ExifHtmlWidget extends \Drupal\exif\Plugin\Field\FieldWidget\ExifWidgetBase
Expanded class hierarchy of ExifHtmlWidget
File
-
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;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ExifHtmlWidget::defaultSettings | public static | function | Overrides ExifWidgetBase::defaultSettings | ||
ExifHtmlWidget::EXIF_HTML_DEFAULT_SETTINGS | constant | ||||
ExifHtmlWidget::formElement | public | function | |||
ExifWidgetBase::EXIF_BASE_DEFAULT_SETTINGS | constant | ||||
ExifWidgetBase::retrieveImageFieldDefaultValue | protected | function | Calculate default value for settings form. | ||
ExifWidgetBase::retrieveImageFieldFromBundle | protected | function | Retrieve list of image field labels by key of image field. | ||
ExifWidgetBase::settingsForm | public | function | 1 | ||
ExifWidgetBase::settingsSummary | public | function | 1 | ||
ExifWidgetBase::validateImageField | public static | function | Validate field to ensure it is linked to a image field. |