You are here

function access_scheme_add in Access Control Kit 7

Menu page callback; add an access scheme of a given type.

Parameters

array $info: The scheme type definition.

Return value

array A form for adding a new access scheme.

1 string reference to 'access_scheme_add'
access_menu in ./access.module
Implements hook_menu().

File

./access_schemes.admin.inc, line 99
Access schemes administrative UI for the access control kit module.

Code

function access_scheme_add($info) {
  drupal_set_title(t('Add access scheme: <em>@type</em>', array(
    '@type' => $info['label'],
  )), PASS_THROUGH);
  $scheme = entity_get_controller('access_scheme')
    ->create(array(
    'type' => $info['type'],
  ));
  $scheme->info = $info;
  return drupal_get_form('access_scheme_form', $scheme);
}