You are here

public function MerciLineItemRevisionRevertTranslationForm::buildForm in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

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

File

modules/merci_line_item/src/Form/MerciLineItemRevisionRevertTranslationForm.php, line 77

Class

MerciLineItemRevisionRevertTranslationForm
Provides a form for reverting a Merci Line Item revision for a single translation.

Namespace

Drupal\merci_line_item\Form

Code

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