เขียนชื่อฟังก์ชั่นในรูป hook_perm
รูปแบบฟังก์ชั่นคือ
<?php
function newmodule_perm() {
return array('access newmodule', 'create newmodule', 'administer newmodule');
} / function newmodule_perm
?>ตามตัวอย่างนี้คือ
<?php
/**
* Valid permissions for this module
* @return array An array of valid permissions for the onthisdate module
*/
function onthisdate_perm() {
return array('access onthisdate content', 'administer onthisdate');
} // function onthisdate_perm
?>ดูเพิ่มที่