You are here

function drush_acquia_lift_menu_rebuild in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 acquia_lift.drush.inc \drush_acquia_lift_menu_rebuild()

Rebuilds the Drupal menu items.

If any menu items get removed from the database, the Lift unified toolbar is not able to properly display or wire up the backbone application functionality.

This rebuilds the menu so that it is as the JavaScript code expects.

File

./acquia_lift.drush.inc, line 31
acquia_lift.drush.inc Provides Acquia Lift drush commands.

Code

function drush_acquia_lift_menu_rebuild() {
  module_load_install('acquia_lift');

  // Delete the existing menu.
  menu_delete_links('acquia-lift-controls');

  // Re-generate the menu correctly.
  _acquia_lift_build_menu('acquia-lift-controls');
  drush_log('The menu has been rebuilt.', 'success');
}