You are here

public function EasyEmailRevisionRevertTranslationForm::buildForm in Easy Email 2.0.x

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

File

src/Form/EasyEmailRevisionRevertTranslationForm.php, line 77

Class

EasyEmailRevisionRevertTranslationForm
Provides a form for reverting a Email revision for a single translation.

Namespace

Drupal\easy_email\Form

Code

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