public function BlazyFileFormatter::getScopedFormElements in Blazy 7
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/BlazyFileFormatter.php \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFileFormatter::getScopedFormElements()
- 8 src/Plugin/Field/FieldFormatter/BlazyFileFormatter.php \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFileFormatter::getScopedFormElements()
Defines the scope for the form elements.
Overrides BlazyFormatterBase::getScopedFormElements
File
- src/
Plugin/ Field/ FieldFormatter/ BlazyFileFormatter.php, line 67
Class
- BlazyFileFormatter
- Plugin implementation of the 'Blazy File' to get videos within images/files.
Namespace
Drupal\blazy\Plugin\Field\FieldFormatterCode
public function getScopedFormElements() {
$bundles = !empty($this->fieldDefinition['bundles']) ? $this->fieldDefinition['bundles'] : [];
return [
'captions' => $this
->admin()
->getFieldOptions($this->fieldInstance, [], $this->targetType, $bundles),
'multimedia' => TRUE,
'target_type' => $this->targetType,
'use_view_mode' => TRUE,
] + parent::getScopedFormElements();
}