function fillpdf_permission in FillPDF 7.2
Same name and namespace in other branches
- 7 fillpdf.module \fillpdf_permission()
Implements hook_permission().
1 call to fillpdf_permission()
File
- ./
fillpdf.module, line 99 - Allows mappings of PDFs to site content
Code
function fillpdf_permission() {
$permissions = array(
'administer pdfs' => array(
'title' => t('Administer PDFs'),
'description' => t('Allows usage of the FillPDF administration screen.'),
),
'publish own pdfs' => array(
'title' => t('Publish Own PDFs'),
'description' => t("Allows filling in and downloading PDFs with one's own site content."),
),
'publish all pdfs' => array(
'title' => t('Publish All PDFs'),
'description' => t('Allows filling in and downloading PDFs with any site content.'),
),
);
if (module_exists('uc_order')) {
// Add additional permissions for Ubercart order/ordered products.
$order_statuses = uc_order_status_list();
foreach ($order_statuses as $order_status) {
$id = $order_status['id'];
$title = $order_status['title'];
$permissions["publish {$id} order data"] = array(
'title' => t("Publish data from %status Ubercart orders", array(
'%status' => $title,
)),
'description' => t("Publish data from Ubercart orders and ordered products with a status of %status.", array(
'%status' => $title,
)),
);
}
}
return $permissions;
}