You are here

public function ConfigurationForm::buildForm in Thunder 8.4

Same name in this branch
  1. 8.4 modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()
  2. 8.4 modules/thunder_article/src/Form/ConfigurationForm.php \Drupal\thunder_article\Form\ConfigurationForm::buildForm()
Same name and namespace in other branches
  1. 8.5 modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()
  2. 8.2 modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()
  3. 8.3 modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()
  4. 6.2.x modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()
  5. 6.0.x modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()
  6. 6.1.x modules/thunder_media/src/Form/ConfigurationForm.php \Drupal\thunder_media\Form\ConfigurationForm::buildForm()

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

modules/thunder_media/src/Form/ConfigurationForm.php, line 34

Class

ConfigurationForm
Class ConfigurationForm.

Namespace

Drupal\thunder_media\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('thunder_media.settings');
  $form['enable_filename_transliteration'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Enable filename transliteration'),
    '#description' => $this
      ->t('Enable this checkbox to clean filenames before saving the files.'),
    '#default_value' => $config
      ->get('enable_filename_transliteration'),
  ];
  $form['enable_filefield_remove_button'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Enable file field remove button'),
    '#description' => $this
      ->t('Enable this checkbox to enable remove buttons for file fields on inline entity forms.'),
    '#default_value' => $config
      ->get('enable_filefield_remove_button'),
  ];
  return parent::buildForm($form, $form_state);
}