public function Mp3playerSettingsForm::buildForm in MP3 Player 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ Mp3playerSettingsForm.php, line 23 - Contains \Drupal\mp3player\Form.
Class
Namespace
Drupal\mp3player\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('mp3player.settings');
$form['mp3player_encode'] = array(
'#type' => 'select',
'#title' => t('Encode Audio File URLs'),
'#default_value' => $config
->get('mp3player_encode'),
'#options' => array(
'no' => t('No'),
'yes' => t('Yes'),
),
'#description' => t('Indicates that the mp3 file urls are encoded.'),
);
return parent::buildForm($form, $form_state);
}