public function HomeboxLayoutRevisionRevertTranslationForm::buildForm in Homebox 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 HomeboxLayoutRevisionRevertForm::buildForm
File
- src/
Form/ HomeboxLayoutRevisionRevertTranslationForm.php, line 86
Class
- HomeboxLayoutRevisionRevertTranslationForm
- Homebox Layout revision reverting form for a single translation.
Namespace
Drupal\homebox\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $homebox_layout_revision = NULL, $langcode = NULL) {
$this->langcode = $langcode;
$form = parent::buildForm($form, $form_state, $homebox_layout_revision);
$form['revert_untranslated_fields'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Revert content shared among translations'),
'#default_value' => FALSE,
];
return $form;
}