public function Block::submitOptionsForm

Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.

Overrides DisplayPluginBase::submitOptionsForm

File

drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php, line 190
Definition of Drupal\views\Plugin\views\display\Block. Definition of Drupal\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\block\Plugin\views\display

Code

public function submitOptionsForm(&$form, &$form_state) {
  parent::submitOptionsForm($form, $form_state);
  switch ($form_state['section']) {
    case 'display_id':
      $this
        ->updateBlockBid($form_state['view']->storage
        ->get('name'), $this->display['id'], $this->display['new_id']);
      break;
    case 'block_description':
      $this
        ->setOption('block_description', $form_state['values']['block_description']);
      break;
    case 'block_caching':
      $this
        ->setOption('block_caching', $form_state['values']['block_caching']);
      break;
  }
}