On this page
function dashboard_form_block_admin_configure_alter
dashboard_form_block_admin_configure_alter(&$form, &$form_state)
Implements hook_form_FORM_ID_alter().
File
- modules/dashboard/dashboard.module, line 392
- Provides a dashboard page in the administrative interface.
Code
function dashboard_form_block_admin_configure_alter(&$form, &$form_state) {
global $theme_key;
drupal_theme_initialize();
// Hide the dashboard regions from the region select list on the block
// configuration form, for all themes except the current theme (since the
// other themes do not display the dashboard).
// @todo This assumes the current page is being displayed using the same
// theme that the dashboard is displayed in.
$dashboard_regions = dashboard_region_descriptions();
foreach (element_children($form['regions']) as $region_name) {
$region = &$form['regions'][$region_name];
if ($region_name != $theme_key && isset($region['#options'])) {
$region['#options'] = array_diff_key($region['#options'], $dashboard_regions);
}
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!dashboard!dashboard.module/function/dashboard_form_block_admin_configure_alter/7.x