+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* This class introduces component to the system and provides all the
* abstract class.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Event_Info extends CRM_Core_Component_Info {
- // docs inherited from interface
+ /**
+ * @inheritDoc
+ */
protected $keyword = 'event';
/**
- * docs inherited from interface
+ * @inheritDoc
* @return array
*/
public function getInfo() {
}
/**
- * docs inherited from interface
+ * @inheritDoc
* @param bool $getAllUnconditionally
+ * @param bool $descriptions
+ * Whether to return permission descriptions
*
* @return array
*/
- public function getPermissions($getAllUnconditionally = FALSE) {
- return array(
- 'access CiviEvent',
- 'edit event participants',
- 'edit all events',
- 'register for events',
- 'view event info',
- 'view event participants',
- 'delete in CiviEvent',
+ public function getPermissions($getAllUnconditionally = FALSE, $descriptions = FALSE) {
+ $permissions = array(
+ 'access CiviEvent' => array(
+ ts('access CiviEvent'),
+ ts('Create events, view all events, and view participant records (for visible contacts)'),
+ ),
+ 'edit event participants' => array(
+ ts('edit event participants'),
+ ts('Record and update backend event registrations'),
+ ),
+ 'edit all events' => array(
+ ts('edit all events'),
+ ts('Edit events even without specific ACL granted'),
+ ),
+ 'register for events' => array(
+ ts('register for events'),
+ ts('Register for events online'),
+ ),
+ 'view event info' => array(
+ ts('view event info'),
+ ts('View online event information pages'),
+ ),
+ 'view event participants' => array(
+ ts('view event participants'),
+ ),
+ 'delete in CiviEvent' => array(
+ ts('delete in CiviEvent'),
+ ts('Delete participants and events that you can edit'),
+ ),
);
+
+ if (!$descriptions) {
+ foreach ($permissions as $name => $attr) {
+ $permissions[$name] = array_shift($attr);
+ }
+ }
+
+ return $permissions;
}
/**
}
/**
- * docs inherited from interface
+ * @inheritDoc
* @return array
*/
public function getUserDashboardElement() {
}
/**
- * docs inherited from interface
+ * @inheritDoc
* @return array
*/
public function registerTab() {
}
/**
- * docs inherited from interface
+ * @inheritDoc
* @return array
*/
public function registerAdvancedSearchPane() {
}
/**
- * docs inherited from interface
+ * @inheritDoc
* @return array
*/
public function getActivityTypes() {
}
/**
- * add shortcut to Create New
+ * add shortcut to Create New.
* @param $shortCuts
* @param $newCredit
*/
$shortCuts = array_merge($shortCuts, $shortCut);
}
}
+
}