You are here

public function JplayerPlayer::settingsForm in jPlayer 8.2

File

src/Plugin/Field/FieldFormatter/JplayerPlayer.php, line 42
Contains \Drupal\jplayer\Plugin\Field\FieldFormatter\JplayerPlayer.

Class

JplayerPlayer
Plugin annotation @FieldFormatter( id = "jplayer_player", label = @Translation("jPlayer - Player"), description = @Translation("Display file fields as an HTML5-compatible with Flash-fallback media player."), field_types = { "file", "text", …

Namespace

Drupal\jplayer\Plugin\Field\FieldFormatter

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
  $elements = parent::settingsForm($form, $form_state);
  $elements['audio_player'] = array(
    '#type' => 'radios',
    '#title' => $this
      ->t('Select Player'),
    '#default_value' => $this
      ->getSetting('audio_player'),
    '#options' => $plugins,
  );
  return $elements;
}