You are here

public function PetRevisionRevertTranslationForm::buildForm in Previewable email templates 8.3

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 PetRevisionRevertForm::buildForm

File

src/Form/PetRevisionRevertTranslationForm.php, line 77

Class

PetRevisionRevertTranslationForm
Provides a form for reverting a Pet revision for a single translation.

Namespace

Drupal\pet\Form

Code

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