You are here

public function BlazyVideoBase::getScopedFormElements in Blazy 8

Same name and namespace in other branches
  1. 8.2 src/Dejavu/BlazyVideoBase.php \Drupal\blazy\Dejavu\BlazyVideoBase::getScopedFormElements()

Defines the scope for the form elements.

2 calls to BlazyVideoBase::getScopedFormElements()
BlazyVideoBase::settingsForm in src/Dejavu/BlazyVideoBase.php
Returns a form to configure settings for the formatter.
BlazyVideoFormatter::getScopedFormElements in src/Plugin/Field/FieldFormatter/BlazyVideoFormatter.php
Defines the scope for the form elements.
1 method overrides BlazyVideoBase::getScopedFormElements()
BlazyVideoFormatter::getScopedFormElements in src/Plugin/Field/FieldFormatter/BlazyVideoFormatter.php
Defines the scope for the form elements.

File

src/Dejavu/BlazyVideoBase.php, line 38

Class

BlazyVideoBase
Base class for blazy video embed field formatters.

Namespace

Drupal\blazy\Dejavu

Code

public function getScopedFormElements() {
  $field = $this->fieldDefinition;
  $entity_type = $field
    ->getTargetEntityTypeId();
  $target_type = $this
    ->getFieldSetting('target_type');
  return [
    'background' => TRUE,
    'breakpoints' => BlazyDefault::getConstantBreakpoints(),
    'current_view_mode' => $this->viewMode,
    'entity_type' => $entity_type,
    'field_name' => $this->fieldDefinition
      ->getName(),
    'image_style_form' => TRUE,
    'media_switch_form' => TRUE,
    'multimedia' => TRUE,
    'plugin_id' => $this
      ->getPluginId(),
    'settings' => $this
      ->getSettings(),
    'target_type' => $target_type,
    'thumb_positions' => TRUE,
    'nav' => TRUE,
  ];
}