/**
  * {@inheritdoc}
  */
 public function buildForm(array $form, array &$form_state, PageInterface $page = NULL, $page_variant_id = NULL, $layout_region_id = NULL, $block_id = NULL)
 {
     $this->page = $page;
     $this->displayVariant = $this->page->getVariant($page_variant_id);
     $this->displayVariant->init($this->page->getExecutable());
     $this->block = $this->displayVariant->getBlock($block_id);
     $form = parent::buildForm($form, $form_state, $page, $page_variant_id, $layout_region_id, $block_id);
     if ($this->getRequest()->isXmlHttpRequest()) {
         $form['actions']['submit']['#ajax'] = array('callback' => array($this, 'submitForm'));
     }
     return $form;
 }