You are here

public function LingotekSettingsDefaultsForm::buildForm in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  2. 4.0.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  3. 3.0.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  4. 3.1.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  5. 3.2.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  6. 3.3.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  7. 3.4.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  8. 3.5.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  9. 3.6.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  10. 3.7.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::buildForm()
  11. 3.8.x src/Form/LingotekSettingsDefaultsForm.php \Drupal\lingotek\Form\LingotekSettingsDefaultsForm::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/LingotekSettingsDefaultsForm.php, line 57
Contains \Drupal\lingotek\Form\LingotekSettingsProjectVaultForm.

Class

LingotekSettingsDefaultsForm
Configure text display settings for this page.

Namespace

Drupal\lingotek\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $this
    ->init();
  foreach ($this->defaults_labels as $key => $label) {
    asort($this->resources[$key]);
    $form[$key] = array(
      '#title' => $label,
      '#type' => 'select',
      '#options' => $this->resources[$key],
      '#default_value' => $this->defaults[$key],
      '#required' => TRUE,
    );
  }
  return parent::buildForm($form, $form_state);
}