You are here

public function TomeStaticCronSettingsForm::buildForm in Tome 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

modules/tome_static/modules/tome_static_cron/src/Form/TomeStaticCronSettingsForm.php, line 33

Class

TomeStaticCronSettingsForm
Configures Tome Static Cron settings for this site.

Namespace

Drupal\tome_static_cron\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $config = $this
    ->config('tome_static_cron.settings');
  $form['base_url'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Base URL'),
    '#description' => $this
      ->t('The base URL to use for static cron runs.'),
    '#default_value' => $config
      ->get('base_url'),
    '#required' => TRUE,
  ];
  return $form;
}