You are here

function registration_permission_list in Entity Registration 8

Same name and namespace in other branches
  1. 8.2 registration.module \registration_permission_list()
  2. 7.2 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 340

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', array(
        '%type_name' => $label,
      )),
    ),
    "update own {$type} registration" => array(
      'title' => t('%type_name: Edit own registrations', array(
        '%type_name' => $label,
      )),
    ),
    "update any {$type} registration" => array(
      'title' => t('%type_name: Edit any registrations', array(
        '%type_name' => $label,
      )),
    ),
    "delete own {$type} registration" => array(
      'title' => t('%type_name: Delete own registrations', array(
        '%type_name' => $label,
      )),
    ),
    "delete any {$type} registration" => array(
      'title' => t('%type_name: Delete any registrations', array(
        '%type_name' => $label,
      )),
    ),
    "create {$type} registration other users" => array(
      'title' => t('%type_name: Register other accounts', array(
        '%type_name' => $label,
      )),
    ),
    "create {$type} registration other anonymous" => array(
      'title' => t('%type_name: Register other people', array(
        '%type_name' => $label,
      )),
    ),
    "edit {$type} registration state" => array(
      'title' => t('%type_name: Edit registration state', array(
        '%type_name' => $label,
      )),
    ),
  );
}