1.20.x block.taxonomy.inc DashboardTaxonomyBlock::formSubmit($form, &$form_state)

Submit handler to save the form settings.

Overrides Block::formSubmit

File

modules/dashboard/includes/block.taxonomy.inc, line 164
Dashboard block displaying informtion about taxonomy, including: -

Class

DashboardTaxonomyBlock
@file Dashboard block displaying informtion about taxonomy, including: -

Code

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

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