Inicio › API reference ›
hook_perm
hooks/core.php, line 1407
- Versions
- hooks
hook_perm()
Define user permissions.
This hook can supply permissions that the module defines, so that they can be selected on the user permissions page and used to restrict access to actions the module performs.
The permissions in the array do not need to be wrapped with the function t(), since the string extractor takes care of extracting permission names defined in the perm hook for translation.
Permissions are checked using user_access().
For a detailed usage example, see page_example.module.
Valor de retorno
An array of permissions strings.
Código
<?php
function hook_perm() {
return array('administer my module');
}
?> 
Comentarios recientes
hace 17 horas 50 mins
hace 1 día 10 horas
hace 1 semana 21 horas
hace 14 semanas 4 días
hace 19 semanas 19 horas
hace 20 semanas 2 días
hace 20 semanas 5 días
hace 20 semanas 5 días
hace 21 semanas 2 días
hace 22 semanas 1 día