public function SimpleMegaMenuRevisionRevertTranslationForm::buildForm in Simple Mega Menu 8
Same name and namespace in other branches
- 2.0.x src/Form/SimpleMegaMenuRevisionRevertTranslationForm.php \Drupal\simple_megamenu\Form\SimpleMegaMenuRevisionRevertTranslationForm::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 SimpleMegaMenuRevisionRevertForm::buildForm
File
- src/
Form/ SimpleMegaMenuRevisionRevertTranslationForm.php, line 80
Class
- SimpleMegaMenuRevisionRevertTranslationForm
- Provides a form for reverting a megamenu revision for a single translation.
Namespace
Drupal\simple_megamenu\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $simple_mega_menu_revision = NULL, $langcode = NULL) {
$this->langcode = $langcode;
$form = parent::buildForm($form, $form_state, $simple_mega_menu_revision);
$form['revert_untranslated_fields'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Revert content shared among translations'),
'#default_value' => FALSE,
];
return $form;
}