You are here

public function ScheduleRevisionRevertTranslationForm::buildForm in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Form/ScheduleRevisionRevertTranslationForm.php \Drupal\business_rules\Form\ScheduleRevisionRevertTranslationForm::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 ScheduleRevisionRevertForm::buildForm

File

src/Form/ScheduleRevisionRevertTranslationForm.php, line 77

Class

ScheduleRevisionRevertTranslationForm
Provides a form for reverting a Schedule revision for a single translation.

Namespace

Drupal\business_rules\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $schedule_revision = NULL, $langcode = NULL) {
  $this->langcode = $langcode;
  $form = parent::buildForm($form, $form_state, $schedule_revision);
  $form['revert_untranslated_fields'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Revert content shared among translations'),
    '#default_value' => FALSE,
  ];
  return $form;
}