public function NodeRevisionRevertTranslationForm::buildForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Form/NodeRevisionRevertTranslationForm.php \Drupal\node\Form\NodeRevisionRevertTranslationForm::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 NodeRevisionRevertForm::buildForm
File
- core/
modules/ node/ src/ Form/ NodeRevisionRevertTranslationForm.php, line 86 - Contains \Drupal\node\Form\NodeRevisionRevertTranslationForm.
Class
- NodeRevisionRevertTranslationForm
- Provides a form for reverting a node revision for a single translation.
Namespace
Drupal\node\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $node_revision = NULL, $langcode = NULL) {
$this->langcode = $langcode;
$form = parent::buildForm($form, $form_state, $node_revision);
$form['revert_untranslated_fields'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('Revert content shared among translations'),
'#default_value' => FALSE,
);
return $form;
}