function block_access_delete_roles in Block Access 7
Same name and namespace in other branches
- 6.2 block_access.db.inc \block_access_delete_roles()
- 6 block_access.db.inc \block_access_delete_roles()
delete a block_access permission for a module or specific block for all roles
Parameters
$module - the name of the module:
$module - the permission being removed:
$delta - optional block delta:
2 calls to block_access_delete_roles()
File
- ./
block_access.db.inc, line 14
Code
function block_access_delete_roles($module, $perm, $delta = NULL) {
$delete = db_delete('block_access_roles')
->condition('module', $module, '=')
->condition('permission', $perm, '=');
if ($delta) {
$delete
->condition('delta', $delta, '=');
}
else {
$delete
->condition('delta', '', '=');
}
return $delete
->execute();
}