You are here

function hook_workbench_access_save_role in Workbench Access 7

Responds to the saving of a role-based section assignment.

This hook fires when a role is assigned to a section.

Parameters

$role: The active role object.

$access_id: The access id to store.

$access_scheme: The active access scheme as defined by hook_workbench_access_info().

1 invocation of hook_workbench_access_save_role()
workbench_access_role_section_save in ./workbench_access.module
Save a role access record and notify other modules.

File

./workbench_access.api.php, line 429
API documentation file for Workbench Access.

Code

function hook_workbench_access_save_role($role, $access_id, $access_scheme) {

  // Notify our module if the section is related to taxonomy.
  if ($access_scheme['access_type'] == 'taxonomy') {
    mymodule_save_role($role, $access_id);
  }
}