You are here

function _features_install_menu in Features 7

Same name and namespace in other branches
  1. 6 features.install \_features_install_menu()
  2. 7.2 features.install \_features_install_menu()

Create menu. See menu.install for an example.

1 call to _features_install_menu()
features_install in ./features.install
Implements hook_install().

File

./features.install, line 38
Install, update and uninstall functions for the features module.

Code

function _features_install_menu() {
  if (db_table_exists('menu_custom') && !db_query("SELECT menu_name FROM {menu_custom} WHERE menu_name = :menu_name", array(
    ':menu_name' => 'features',
  ))
    ->fetchField()) {
    $t = get_t();
    $id = db_insert('menu_custom')
      ->fields(array(
      'menu_name' => 'features',
      'title' => $t('Features'),
      'description' => $t('Menu items for any enabled features.'),
    ))
      ->execute();
  }
}