public function OpignoAnswerRevisionRevertTranslationForm::buildForm in Opigno module 8
Same name and namespace in other branches
- 3.x src/Form/OpignoAnswerRevisionRevertTranslationForm.php \Drupal\opigno_module\Form\OpignoAnswerRevisionRevertTranslationForm::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 OpignoAnswerRevisionRevertForm::buildForm
File
- src/
Form/ OpignoAnswerRevisionRevertTranslationForm.php, line 77
Class
- OpignoAnswerRevisionRevertTranslationForm
- Provides a form for reverting a Answer revision for a single translation.
Namespace
Drupal\opigno_module\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $opigno_answer_revision = NULL, $langcode = NULL) {
$this->langcode = $langcode;
$form = parent::buildForm($form, $form_state, $opigno_answer_revision);
$form['revert_untranslated_fields'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Revert content shared among translations'),
'#default_value' => FALSE,
];
return $form;
}