summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-18 10:20:22 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-18 10:20:22 +0000
commitda79408317e86e42827589c18383e292308a16e2 (patch)
treefe8db38fce21f7b922dcc7836edf1cd0288acb8a
parentb65538567d30138db7c91b5d92717a0e2cb0a240 (diff)
downloadbrdo-da79408317e86e42827589c18383e292308a16e2.tar.gz
brdo-da79408317e86e42827589c18383e292308a16e2.tar.bz2
- Patch #491490 by torelad: updated hook_perm() documentation.
-rw-r--r--modules/system/system.api.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 1349a7b8f..c8d07cd77 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -551,11 +551,13 @@ function hook_system_info_alter(&$info, $file) {
* 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
+ * can be selected on the user permissions page and used to grant or restrict
* access to actions the module performs.
*
* @return
- * An array of which permission names are the keys and their corresponding value is a description of the permission
+ * An array of permissions where the permission name is the array key and the
+ * corresponding key value is an array of key/value pairs specifying
+ * the permission's title and description
*
* 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.
@@ -566,7 +568,10 @@ function hook_system_info_alter(&$info, $file) {
*/
function hook_perm() {
return array(
- 'administer my module' => t('Perform maintenance tasks for my module'),
+ 'administer my module' => array(
+ 'title' => t('Administer my module'),
+ 'description' => t('Perform administration tasks for my module.'),
+ ),
);
}