function hook_spaces_dashboard_access_alter in Spaces 7
Same name and namespace in other branches
- 6.3 spaces_dashboard/spaces_dashboard.api.php \hook_spaces_dashboard_access_alter()
- 7.3 spaces_dashboard/spaces_dashboard.api.php \hook_spaces_dashboard_access_alter()
Alter the default dashboard access settings for a given block.
Parameters
&$access: An associative array of block `bid`, ie. "{$module}-{$delta}", to access boolean value. Blocks with a TRUE value are accessible, blocks with a FALSE value are inaccessible.
Return value
The return value is unused. Your hook implementation should alter the $access parameter directly.
File
- spaces_dashboard/
spaces_dashboard.api.php, line 19 - Hooks provided by Spaces Dashboard.
Code
function hook_spaces_dashboard_access_alter(&$access) {
// Don't allow access to any blocks from the menu module on the dashboard.
if ($block->module === 'menu') {
$access = FALSE;
}
}