/**
  * {@inheritdoc}
  */
 public function save(array $form, FormStateInterface $form_state)
 {
     // @todo This feels very wrong.
     $variant_plugin = $this->getVariantPlugin();
     if ($variant_plugin instanceof BlockVariantInterface) {
         // If the blocks were rearranged, update their values.
         if (!$form_state->isValueEmpty(['variant_plugin', 'blocks'])) {
             foreach ($form_state->getValue(['variant_plugin', 'blocks']) as $block_id => $block_values) {
                 $variant_plugin->updateBlock($block_id, $block_values);
             }
         }
     }
     parent::save($form, $form_state);
     $form_state->setRedirect('entity.page.edit_form', ['page' => $this->entity->get('page')]);
 }
 /**
  * {@inheritdoc}
  */
 public function save(array $form, FormStateInterface $form_state)
 {
     parent::save($form, $form_state);
     $form_state->setRedirectUrl($this->getEntity()->toUrl('edit-form'));
 }