X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FInfo.php;h=6cc453aa20dd8939739f3d240ad64a631f322c89;hb=5e128ce5edbd7db72746812c0eb35c4d0fd6d938;hp=3d59c3f4529f4c9ebc7d2825234f01c958264f1f;hpb=49cfbaed65e6920698d83b57985df1eb228479a2;p=civicrm-core.git diff --git a/CRM/Event/Info.php b/CRM/Event/Info.php index 3d59c3f452..6cc453aa20 100644 --- a/CRM/Event/Info.php +++ b/CRM/Event/Info.php @@ -1,27 +1,11 @@ 'CiviEvent', 'translatedName' => ts('CiviEvent'), 'title' => ts('CiviCRM Event Engine'), 'search' => 1, 'showActivitiesInCore' => 1, - ); + ]; } /** @@ -65,39 +50,39 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function getPermissions($getAllUnconditionally = FALSE, $descriptions = FALSE) { - $permissions = array( - 'access CiviEvent' => array( + $permissions = [ + 'access CiviEvent' => [ ts('access CiviEvent'), ts('Create events, view all events, and view participant records (for visible contacts)'), - ), - 'edit event participants' => array( + ], + 'edit event participants' => [ ts('edit event participants'), ts('Record and update backend event registrations'), - ), - 'edit all events' => array( + ], + 'edit all events' => [ ts('edit all events'), ts('Edit events even without specific ACL granted'), - ), - 'register for events' => array( + ], + 'register for events' => [ ts('register for events'), ts('Register for events online'), - ), - 'view event info' => array( + ], + 'view event info' => [ ts('view event info'), ts('View online event information pages'), - ), - 'view event participants' => array( + ], + 'view event participants' => [ ts('view event participants'), - ), - 'delete in CiviEvent' => array( + ], + 'delete in CiviEvent' => [ ts('delete in CiviEvent'), ts('Delete participants and events that you can edit'), - ), - 'manage event profiles' => array( + ], + 'manage event profiles' => [ ts('manage event profiles'), ts('Allow users to create, edit and copy event-related profile forms used for online event registration.'), - ), - ); + ], + ]; if (!$descriptions) { foreach ($permissions as $name => $attr) { @@ -112,9 +97,9 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function getAnonymousPermissionWarnings() { - return array( + return [ 'access CiviEvent', - ); + ]; } /** @@ -122,12 +107,12 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function getUserDashboardElement() { - return array( + return [ 'name' => ts('Events'), 'title' => ts('Your Event(s)'), - 'perm' => array('register for events'), + 'perm' => ['register for events'], 'weight' => 20, - ); + ]; } /** @@ -135,12 +120,12 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function registerTab() { - return array( + return [ 'title' => ts('Events'), 'id' => 'participant', 'url' => 'participant', 'weight' => 40, - ); + ]; } /** @@ -156,10 +141,10 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function registerAdvancedSearchPane() { - return array( + return [ 'title' => ts('Events'), 'weight' => 40, - ); + ]; } /** @@ -167,11 +152,11 @@ class CRM_Event_Info extends CRM_Core_Component_Info { * @return array */ public function getActivityTypes() { - $types = array(); - $types['Event'] = array( + $types = []; + $types['Event'] = [ 'title' => ts('Event'), 'callback' => 'CRM_Event_Page_EventInfo::run()', - ); + ]; return $types; } @@ -184,20 +169,20 @@ class CRM_Event_Info extends CRM_Core_Component_Info { if (CRM_Core_Permission::check('access CiviEvent') && CRM_Core_Permission::check('edit event participants') ) { - $shortCut[] = array( + $shortCut[] = [ 'path' => 'civicrm/participant/add', 'query' => "reset=1&action=add&context=standalone", 'ref' => 'new-participant', 'title' => ts('Event Registration'), - ); + ]; if ($newCredit) { $title = ts('Event Registration') . '
  (' . ts('credit card') . ')'; - $shortCut[0]['shortCuts'][] = array( + $shortCut[0]['shortCuts'][] = [ 'path' => 'civicrm/participant/add', 'query' => "reset=1&action=add&context=standalone&mode=live", 'ref' => 'new-participant-cc', 'title' => $title, - ); + ]; } $shortCuts = array_merge($shortCuts, $shortCut); }