/**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     // Save the page entity.
     $this->page->save();
     drupal_set_message($this->t('The %label display variant has been updated.', ['%label' => $this->displayVariant->label()]));
     $form_state->setRedirectUrl($this->page->urlInfo('edit-form'));
 }
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     // If this display variant is new, add it to the page.
     $display_variant_id = $this->page->addVariant($this->displayVariant->getConfiguration());
     // Save the page entity.
     $this->page->save();
     drupal_set_message($this->t('The %label display variant has been added.', ['%label' => $this->displayVariant->label()]));
     $form_state->setRedirect('page_manager.display_variant_edit', ['page' => $this->page->id(), 'display_variant_id' => $display_variant_id]);
 }