You are here

public function BrightcoveCronSettingsForm::buildForm in Brightcove Video Connect 3.x

Same name and namespace in other branches
  1. 8.2 src/Form/BrightcoveCronSettingsForm.php \Drupal\brightcove\Form\BrightcoveCronSettingsForm::buildForm()
  2. 8 src/Form/BrightcoveCronSettingsForm.php \Drupal\brightcove\Form\BrightcoveCronSettingsForm::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/BrightcoveCronSettingsForm.php, line 30

Class

BrightcoveCronSettingsForm
Builds the form for managing Brightcove cron settings.

Namespace

Drupal\brightcove\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('brightcove.settings');
  $form['disable_cron'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Disable cron'),
    '#description' => $this
      ->t('Enabling this option will prevent a Brightcove-to-Drupal sync running from cron.'),
    '#default_value' => $config
      ->get('disable_cron'),
  ];
  return parent::buildForm($form, $form_state);
}