function page_example_perm in Examples for Developers 6
Implementation of hook_perm().
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 50 - This is an example outlining how a module can be used to display a custom page at a given URL.
Code
function page_example_perm() {
// Defining permissions for your module is as simple as returning an array of
// strings.
return array(
'access simple page',
'access arguments page',
);
}