예제 #1
0
 /**
  * Overrides \Drupal\block\BlockBase::blockSubmit().
  */
 public function blockSubmit($form, &$form_state)
 {
     // Invalidate the block cache to update custom block-based derivatives.
     if ($this->moduleHandler->moduleExists('block')) {
         $this->configuration['view_mode'] = $form_state['values']['block_content']['view_mode'];
         $this->blockManager->clearCachedDefinitions();
     }
 }
 /**
  * {@inheritdoc}
  */
 public function blockSubmit($form, FormStateInterface $form_state)
 {
     // Invalidate the block cache to update custom block-based derivatives.
     if ($this->moduleHandler->moduleExists('block')) {
         $this->configuration['view_mode'] = $form_state->getValue('view_mode');
         $this->blockManager->clearCachedDefinitions();
     }
 }