1 views.block.inc ViewsBlock::formSubmit($form, &$form_state)

Submit handler to save the form settings.

Overrides Block::formSubmit

File

core/modules/views/includes/views.block.inc, line 477

Class

ViewsBlock
Displays a view listing as a block, with overriding options.

Code

function formSubmit($form, &$form_state) {
  parent::formSubmit($form, $form_state);

  // Copy everything from our defaults.
  $keys = array(
    'link_to_view',
    'more_link',
    'use_pager',
    'pager_id',
    'items_per_page',
    'offset',
    'path_override',
    'path',
    'arguments',
    'fields_override',
    'exposed',
  );

  foreach ($keys as $key) {
    if (isset($form_state['values'][$key])) {
      $this->settings[$key] = $form_state['values'][$key];
    }
  }
}