You are here

public function TmgmtExtensionSuitSettingsForm::buildForm in TMGMT Extension Suite 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/TmgmtExtensionSuitSettingsForm.php \Drupal\tmgmt_extension_suit\Form\TmgmtExtensionSuitSettingsForm::buildForm()
  2. 8 src/Form/TmgmtExtensionSuitSettingsForm.php \Drupal\tmgmt_extension_suit\Form\TmgmtExtensionSuitSettingsForm::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/TmgmtExtensionSuitSettingsForm.php, line 53

Class

TmgmtExtensionSuitSettingsForm
TMGMT Extension Suit settings form.

Namespace

Drupal\tmgmt_extension_suit\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('tmgmt_extension_suit.settings');
  $form['do_track_changes'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Track changes of the translatable entities.'),
    '#description' => 'If checked, all the entities that once were submitted for translation, would be re-sent automatically.',
    '#default_value' => $config
      ->get('do_track_changes'),
    '#required' => FALSE,
  ];
  $form['interval'] = [
    '#type' => 'number',
    '#min' => 0,
    '#step' => 1,
    '#title' => $this
      ->t('Run "Add items to check status queue" cron job every seconds'),
    '#description' => $this
      ->t('Default value is 10800 (which equals to 3 hours).'),
    '#default_value' => $config
      ->get('interval'),
    '#required' => TRUE,
  ];
  return parent::buildForm($form, $form_state);
}