File: dashboard.api.php

package info (click to toggle)
drupal7 7.14-2%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 24,516 kB
  • sloc: php: 42,979; pascal: 39,064; sh: 1,622; xml: 441; makefile: 14; sql: 1
file content (42 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

/**
 * @file
 * Hooks provided by the Dashboard module.
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Add regions to the dashboard.
 *
 * @return
 *   An array whose keys are the names of the dashboard regions and whose
 *   values are the titles that will be displayed in the blocks administration
 *   interface. The keys are also used as theme wrapper functions.
 */
function hook_dashboard_regions() {
  // Define a new dashboard region. Your module can also then define
  // theme_mymodule_dashboard_region() as a theme wrapper function to control
  // the region's appearance.
  return array('mymodule_dashboard_region' => "My module's dashboard region");
}

/**
 * Alter dashboard regions provided by modules.
 *
 * @param $regions
 *   An array containing all dashboard regions, in the format provided by
 *   hook_dashboard_regions().
 */
function hook_dashboard_regions_alter($regions) {
  // Remove the sidebar region defined by the core dashboard module.
  unset($regions['dashboard_sidebar']);
}

/**
 * @} End of "addtogroup hooks".
 */