You are here

public function AdminForm::buildForm in Scheduled Updates 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/AdminForm.php, line 39
Contains Drupal\scheduled_updates\Form\AdminForm.

Class

AdminForm
Class AdminForm.

Namespace

Drupal\scheduled_updates\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('scheduled_updates.settings');
  $form['timeout'] = array(
    '#type' => 'number',
    '#title' => t('Timeout in seconds for running updates.'),
    '#default_value' => $config
      ->get('timeout') ? $config
      ->get('timeout') : 15,
    '#min' => 1,
  );
  return parent::buildForm($form, $form_state);
}