Project

General

Profile

Paste
Download (1.04 KB) Statistics
| Branch: | Revision:

root / drupal7 / modules / dashboard / dashboard.api.php @ bd0d4c5c

1
<?php
2

    
3
/**
4
 * @file
5
 * Hooks provided by the Dashboard module.
6
 */
7

    
8
/**
9
 * @addtogroup hooks
10
 * @{
11
 */
12

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

    
28
/**
29
 * Alter dashboard regions provided by modules.
30
 *
31
 * @param $regions
32
 *   An array containing all dashboard regions, in the format provided by
33
 *   hook_dashboard_regions().
34
 */
35
function hook_dashboard_regions_alter(&$regions) {
36
  // Remove the sidebar region defined by the core dashboard module.
37
  unset($regions['dashboard_sidebar']);
38
}
39

    
40
/**
41
 * @} End of "addtogroup hooks".
42
 */