You are here

public function HeartbeatStreamRevisionRevertTranslationForm::buildForm in Heartbeat 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 HeartbeatStreamRevisionRevertForm::buildForm

File

src/Form/HeartbeatStreamRevisionRevertTranslationForm.php, line 77

Class

HeartbeatStreamRevisionRevertTranslationForm
Provides a form for reverting a Heartbeat stream revision for a single translation.

Namespace

Drupal\heartbeat\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $heartbeat_stream_revision = NULL, $langcode = NULL) {
  $this->langcode = $langcode;
  $form = parent::buildForm($form, $form_state, $heartbeat_stream_revision);
  $form['revert_untranslated_fields'] = array(
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Revert content shared among translations'),
    '#default_value' => FALSE,
  );
  return $form;
}