public NodeRevisionRevertTranslationForm::buildForm(array $form, FormStateInterface $form_state, $node_revision = NULL, $langcode = NULL)
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 81
Class
- NodeRevisionRevertTranslationForm
- Provides a form for reverting a node revision for a single translation.
Namespace
Drupal\node\Form
Code
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; }
Please login to continue.