function page_example_permission in Examples for Developers 7
Implements hook_permission().
Since the access to our new custom pages will be granted based on special permissions, we need to define what those permissions are here. This ensures that they are available to enable on the user role administration pages.
Related topics
File
- page_example/
page_example.module, line 57 - Module file for page_example_module.
Code
function page_example_permission() {
return array(
'access simple page' => array(
'title' => t('Access simple page'),
'description' => t('Allow users to access simple page'),
),
'access arguments page' => array(
'title' => t('Access page with arguments'),
'description' => t('Allow users to access page with arguments'),
),
);
}