function pay_permission in Pay 7
Implements hook_permission().
File
- ./
pay.module, line 34 - Pay module allows for accepting payments using pluggable payment backends.
Code
function pay_permission() {
// Permissions based on form types and global settings.
$permissions = array(
'view reports for any payment form' => array(
'title' => t('view reports for any payment form'),
'description' => t('View reports for any payment form'),
),
'administer pay' => array(
'title' => t('administer pay'),
'description' => t('Administer pay module'),
),
'administer payments for any form' => array(
'title' => t('administer payments for any form'),
'description' => t('Administer payments for any pay module form'),
),
'make payments on any form' => array(
'title' => t('make payments on any form'),
'description' => t('Make payments on any pay module form'),
),
);
foreach (pay_handlers('pay_form') as $name => $info) {
$permissions['administer payments for ' . $name . ' forms'] = array(
'title' => t('administer payments for ' . $name . ' form'),
'description' => t('Administer payments for ' . $name . ' pay module form'),
);
$permissions['make payments on ' . $name . ' forms'] = array(
'title' => t('administer payments for ' . $name . ' form'),
'description' => t('Administer payments for ' . $name . ' pay module form'),
);
$permissions['view reports for ' . $name . ' forms'] = array(
'title' => t('view reports for ' . $name . ' payment form'),
'description' => t('View reports for ' . $name . ' payment form'),
);
}
return $permissions;
}