You are here

function taxonomy_menu_block_save_block in Taxonomy menu block 7

Save function.

4 calls to taxonomy_menu_block_save_block()
taxonomy_menu_block_add_block_form_submit in ./taxonomy_menu_block.admin.inc
Submit function.
taxonomy_menu_block_update_7100 in ./taxonomy_menu_block.install
Make old blocks compatible with newly added configuration options.
taxonomy_menu_block_update_7101 in ./taxonomy_menu_block.install
Make old blocks compatible with new node options.
_taxonomy_menu_block_edit_block in ./taxonomy_menu_block.admin.inc
Edit function.

File

./taxonomy_menu_block.admin.inc, line 134
Admin functions and form settings for Taxonomy menu block module.

Code

function taxonomy_menu_block_save_block($delta = '', $values = array()) {
  if (empty($delta)) {
    return;
  }
  $ctypes = array();
  foreach ($values['ctype'] as $key => $type) {
    if ($type) {
      $ctypes[] = $type;
    }
  }
  $taxonomy_menu_block = array(
    'delta' => $delta,
    'admin_title' => $values['admin_title'],
    'vid' => $values['vid'],
    'parent' => $values['parent'],
    'parent_fixed' => $values['parent_fixed'],
    'parent_dynamic' => $values['parent_dynamic'],
    'depth' => $values['depth'],
    'home_link' => $values['home_link'],
    'nodes' => $values['nodes'],
    'nodes_aggregation' => $values['nodes_aggregation'],
    'hide_empty' => $values['hide_empty'],
    'ctype' => $ctypes,
  );
  variable_set("taxonomy_menu_block_{$delta}", $taxonomy_menu_block);
}