You are here

function block_access_add_role in Block Access 7

Same name and namespace in other branches
  1. 6.2 block_access.db.inc \block_access_add_role()
  2. 6 block_access.db.inc \block_access_add_role()

insert a block_access_roles record

Parameters

$rid - role ID:

$module - the name of the module:

$perm - the permission being added:

$delta - optional block delta:

2 calls to block_access_add_role()
block_access_config_set_roles in ./block_access.module
block_access_features_revert in ./block_access.module
Implements hook_features_revert().

File

./block_access.db.inc, line 34

Code

function block_access_add_role($rid, $module, $perm, $delta = NULL) {
  $record = array(
    'rid' => $rid,
    'module' => $module,
    'delta' => $delta,
    'permission' => $perm,
  );
  $result = drupal_write_record('block_access_roles', $record);
  return $result;
}