1 system.install system_update_1009()

Enable Admin Menu module.

Related topics

File

core/modules/system/system.install, line 1798
Install, update and uninstall functions for the system module.

Code

function system_update_1009() {
  update_module_enable(array('admin_bar'));

  // Install default config.
  $config = config('admin_bar.settings');
  $config->set('margin_top', 1);
  $config->set('position_fixed', 0);
  $config->set('components', array(
    'admin_bar.icon',
    'admin_bar.menu',
    'admin_bar.search',
    'admin_bar.users',
    'admin_bar.account',
  ));
  $config->save();

  // Manually install schema, as update_module_enable() does not do this for us.
  if (!db_table_exists('cache_admin_bar')) {
    $cache_admin_bar = backdrop_get_schema_unprocessed('system', 'cache');
    $cache_admin_bar['description'] = 'Cache table for Administration menu to store client-side caching hashes.';
    db_create_table('cache_admin_bar', $cache_admin_bar);
  }
}