You are here

function block_access_config_set_roles in Block Access 7

Same name and namespace in other branches
  1. 6.2 block_access.module \block_access_config_set_roles()
  2. 6 block_access.module \block_access_config_set_roles()
2 calls to block_access_config_set_roles()
block_access_config_submit in ./block_access.module
block_access_module_form_submit in ./block_access.admin.inc

File

./block_access.module, line 619

Code

function block_access_config_set_roles($perm, $roleset, $module, $delta = NULL) {
  $roles = array_filter($roleset);
  require_once drupal_get_path('module', 'block_access') . '/block_access.db.inc';
  $result = block_access_delete_roles($module, $perm, $delta);
  foreach ($roles as $rid) {
    $result = block_access_add_role($rid, $module, $perm, $delta);
  }
}