You are here

function registration_permission_list in Entity Registration 7.2

Same name and namespace in other branches
  1. 8.2 registration.module \registration_permission_list()
  2. 8 registration.module \registration_permission_list()
  3. 7 registration.module \registration_permission_list()

Builds permissions for a registration type.

Parameters

object $info: Information about a registration type.

Return value

array An array of permission names and descriptions keyed by permission name.

1 call to registration_permission_list()
registration_permission in ./registration.module
Implements hook_permission().

File

./registration.module, line 408

Code

function registration_permission_list($info) {
  $type = $info->name;
  $label = $info->label;
  return array(
    "administer {$type} registration" => array(
      'title' => t('%type_name: Administer settings', array(
        '%type_name' => $label,
      )),
      'description' => t('Allow changing registration settings for all entities of this type.'),
    ),
    "administer own {$type} registration" => array(
      'title' => t('%type_name: Administer own settings', array(
        '%type_name' => $label,
      )),
      'description' => t('Allow changing registration settings for entities which a user has edit access.'),
    ),
    "view {$type} registration" => array(
      'title' => t('%type_name: View all registrations', array(
        '%type_name' => $label,
      )),
    ),
    "view own {$type} registration" => array(
      'title' => t('%type_name: View own registrations', array(
        '%type_name' => $label,
      )),
    ),
    "create {$type} registration" => array(
      'title' => t('%type_name: Create new registration for anybody', array(
        '%type_name' => $label,
      )),
    ),
    "create own {$type} registration" => array(
      'title' => t('%type_name: Create new registration for yourself', array(
        '%type_name' => $label,
      )),
    ),
    "update any {$type} registration" => array(
      'title' => t('%type_name: Edit any registrations', array(
        '%type_name' => $label,
      )),
    ),
    "update own {$type} registration" => array(
      'title' => t('%type_name: Edit own registrations', array(
        '%type_name' => $label,
      )),
    ),
    "delete any {$type} registration" => array(
      'title' => t('%type_name: Delete any registrations', array(
        '%type_name' => $label,
      )),
    ),
    "delete own {$type} registration" => array(
      'title' => t('%type_name: Delete own registrations', array(
        '%type_name' => $label,
      )),
    ),
    "edit {$type} registration state" => array(
      'title' => t('%type_name: Edit registration state', array(
        '%type_name' => $label,
      )),
    ),
  );
}