1 block.node_types.inc DashboardContentTypesBlock::formSubmit($form, &$form_state)

Submit handler to save the form settings.

Overrides Block::formSubmit

File

core/modules/dashboard/includes/block.node_types.inc, line 155
Dashboard block displaying informtion about content types.

Class

DashboardContentTypesBlock
@file Dashboard block displaying informtion about content types.

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);
  }
}