You are here

public function Rutube::options in Video Filter 8

Embed options. (e.g. Autoplay, Width/Height).

Uses Drupal's Form API.

Overrides VideoFilterBase::options

File

src/Plugin/VideoFilter/Rutube.php, line 54

Class

Rutube
Provides Rutube codec for Video Filter.

Namespace

Drupal\video_filter\Plugin\VideoFilter

Code

public function options() {
  $form = parent::options();
  $form['sTitle'] = [
    '#title' => $this
      ->t('Show video title'),
    '#type' => 'checkbox',
  ];
  $form['sAuthor'] = [
    '#title' => $this
      ->t('Show author name'),
    '#type' => 'checkbox',
  ];
  $form['bmstart'] = [
    '#title' => $this
      ->t('Start time (optional)'),
    '#type' => 'textfield',
    '#description' => $this
      ->t('Values is in seconds.'),
  ];
  $form['standardColor'] = [
    '#title' => $this
      ->t('Use standard player color'),
    '#type' => 'checkbox',
    '#default_value' => TRUE,
  ];
  $form['skinColor'] = [
    '#title' => $this
      ->t('Color (optional)'),
    '#type' => 'textfield',
    '#description' => $this
      ->t('Only Hexadecimal color codes allowed. Do not include <strong>#</strong>. For example: <strong>FF0000</strong>.'),
    '#states' => [
      'invisible' => [
        ':input[name="options[rutube][options][standardColor]"]' => [
          'checked' => TRUE,
        ],
      ],
    ],
  ];
  return $form;
}