You are here

public function SitewideAlertRevisionRevertTranslationForm::buildForm in Sitewide Alert 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 SitewideAlertRevisionRevertForm::buildForm

File

src/Form/SitewideAlertRevisionRevertTranslationForm.php, line 80

Class

SitewideAlertRevisionRevertTranslationForm
Provides a form for reverting a Sitewide Alert revision for a single trans.

Namespace

Drupal\sitewide_alert\Form

Code

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