function FileVideoFormatter::settingsForm
Overrides FileMediaFormatterBase::settingsForm
File
- 
              core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileVideoFormatter.php, line 43  
Class
- FileVideoFormatter
 - Plugin implementation of the 'file_video' formatter.
 
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
  return parent::settingsForm($form, $form_state) + [
    'muted' => [
      '#title' => $this->t('Muted'),
      '#type' => 'checkbox',
      '#default_value' => $this->getSetting('muted'),
    ],
    'width' => [
      '#type' => 'number',
      '#title' => $this->t('Width'),
      '#default_value' => $this->getSetting('width'),
      '#size' => 5,
      '#maxlength' => 5,
      '#field_suffix' => $this->t('pixels'),
      // A width of zero pixels would make this video invisible.
'#min' => 1,
    ],
    'height' => [
      '#type' => 'number',
      '#title' => $this->t('Height'),
      '#default_value' => $this->getSetting('height'),
      '#size' => 5,
      '#maxlength' => 5,
      '#field_suffix' => $this->t('pixels'),
      // A height of zero pixels would make this video invisible.
'#min' => 1,
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.