You are here

public function SettingsForm::buildForm in Field Formatter Template 8

Same name and namespace in other branches
  1. 8.2 src/Form/SettingsForm.php \Drupal\fft\Form\SettingsForm::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

src/Form/SettingsForm.php, line 30

Class

SettingsForm
Defines a form that configures devel settings.

Namespace

Drupal\fft\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['fft_storage_dir'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Formatter template directory'),
    '#default_value' => $this
      ->config('fft.settings')
      ->get('fft_storage_dir'),
    '#description' => $this
      ->t('Configure directory storage field formatter template. Each directory per line.'),
    '#required' => TRUE,
  ];
  return parent::buildForm($form, $form_state);
}