You are here

function taxonomy_menu_save_menu_group in Taxonomy menu 6.3

Save the Menu Group to the database

Parameters

array $menu_group: 'mgid' => mgid, if blank or 0 then a new menu group will be entered 'path' => path function to run to get the path 'name' => diaply name of menu group 'parnent_menu' => parent menu item formated simialr to the return of menu_parent_options(). 'term_set_rtln' => function name used to create the relationship. 'items' => tree array terms

Return value

$menu_group by reference with mgid filled in.

3 calls to taxonomy_menu_save_menu_group()
taxonomy_menu_group_form_submit in ./taxonomy_menu.admin.inc
Submit Handler for taxonomy_menu_group_form
taxonomy_menu_group_remove_term_set in ./taxonomy_menu.admin.inc
Menu callback to remove Term Set from Menu group
taxonomy_menu_save_menu_set_rtln in ./taxonomy_menu.admin.inc
Save a Term Set/mneugrpou Reltn

File

./taxonomy_menu.admin.inc, line 693
admin section for taxonomy menu

Code

function taxonomy_menu_save_menu_group(&$menu_group) {

  // If pased an object, convert it into an array
  if (is_object($menu_group)) {
    $menu_group = (array) $menu_group;
  }
  if ($menu_group['mgid']) {
    drupal_write_record('taxonomy_menu_group', $menu_group, 'mgid');
  }
  else {
    drupal_write_record('taxonomy_menu_group', $menu_group);
  }
  drupal_set_message(t('Menu Group %menu_group has been saved', array(
    '%menu_group' => $menu_group['name'],
  )));
}