1 block.create.inc DashboardCreateBlock::formSubmit($form, &$form_state)

Submit handler to save the form settings.

Overrides Block::formSubmit

File

core/modules/dashboard/includes/block.create.inc, line 116
Dashboard block providing links to create new content.

Class

DashboardCreateBlock
@file Dashboard block providing links to create new content.

Code

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

  // If all types are checked, save nothing, indicating all types are allowed.
  $checked_types = array_filter($form_state['values']['types']);
  if (count($form['types']['#options']) === count($checked_types)) {
    $this->settings['types'] = array();
  }
  else {
    $this->settings['types'] = array_values($checked_types);
  }
}