dashboard.api.php

Hooks provided by the Dashboard module.

Functions

Namesort descending Description
hook_dashboard_regions Add regions to the dashboard.
hook_dashboard_regions_alter Alter dashboard regions provided by modules.

File

drupal/modules/dashboard/dashboard.api.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the Dashboard module.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Add regions to the dashboard.
  12. *
  13. * @return
  14. * An array whose keys are the names of the dashboard regions and whose
  15. * values are the titles that will be displayed in the blocks administration
  16. * interface. The keys are also used as theme wrapper functions.
  17. */
  18. function hook_dashboard_regions() {
  19. // Define a new dashboard region. Your module can also then define
  20. // theme_mymodule_dashboard_region() as a theme wrapper function to control
  21. // the region's appearance.
  22. return array('mymodule_dashboard_region' => "My module's dashboard region");
  23. }
  24. /**
  25. * Alter dashboard regions provided by modules.
  26. *
  27. * @param $regions
  28. * An array containing all dashboard regions, in the format provided by
  29. * hook_dashboard_regions().
  30. */
  31. function hook_dashboard_regions_alter(&$regions) {
  32. // Remove the sidebar region defined by the core dashboard module.
  33. unset($regions['dashboard_sidebar']);
  34. }
  35. /**
  36. * @} End of "addtogroup hooks".
  37. */