Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brienne
Developer Documentation
Commits
f0e5bfa6
Commit
f0e5bfa6
authored
5 years ago
by
Seamus Lee
Browse files
Options
Downloads
Patches
Plain Diff
Further improvements to l10n format in hook_civicrm_permission documentation
parent
c76df1e2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/hooks/hook_civicrm_permission.md
+11
-13
11 additions, 13 deletions
docs/hooks/hook_civicrm_permission.md
with
11 additions
and
13 deletions
docs/hooks/hook_civicrm_permission.md
+
11
−
13
View file @
f0e5bfa6
...
...
@@ -28,26 +28,24 @@ to grant it to users.
- Simple associative array in the format "permission string =>
label". Compatible with CiviCRM 4.3+.
$prefix = ts('CiviCRM Grant Program:') . ' ';
$permissions['edit grant programs'] = $prefix . ts('edit grant programs');
$permissions['delete in Grant Program'] = $prefix . ts('delete grant program');
```php
$permissions['edit grant programs'] = ts('CiviCRM Grant Program: edit grant programs');
$permissions['delete in Grant Program'] = ts('CiviCRM Grant Program: delete grant program');
```
- A multidimensional array in the format "permission string =>
array(label, description)". Compatible with CiviCRM 4.6+. The
first array item is the label for the permission. If a second
array item is present, it will appear as a description beneath
the permission.
$prefix = ts('CiviCRM Grant Program:') . ' ';
```php
$permissions['edit grant programs'] = [
$prefix . ts('
edit grant programs'), // label
ts('Create or edit grant programs and their criteria'), // description
ts('CiviCRM Grant Program:
edit grant programs'), // label
ts('
CiviCRM Grant Program:
Create or edit grant programs and their criteria'), // description
];
$permissions['delete in Grant Program'] = [
$prefix . ts('
delete grant program'), // if no description, just give an array with the label
ts('CiviCRM Grant Program:
delete grant program'), // if no description, just give an array with the label
];
```
## Returns
-
null
...
...
@@ -71,7 +69,7 @@ Nagios](https://github.com/aghstrategies/com.aghstrategies.civimonitor/blob/bc19
extension, including a check for the CiviCRM version in order to ensure
backwards compatibility while providing a description to versions that
support it.
```
php
use
CRM_Civimonitor_ExtensionUtil
as
E
;
function
civimonitor_civicrm_permission
(
&
$permissions
)
{
...
...
@@ -90,6 +88,6 @@ support it.
];
}
}
```
See
[
http://issues.civicrm.org/jira/browse/CRM-11946
](
http://issues.civicrm.org/jira/browse/CRM-11946
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment