X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FInfo.php;h=1d6d2d0f05beb6cd139b990a7f3748d71efd9660;hb=3410006a55b7e8b4d90c69c07d367f93b2454872;hp=21c7a110dff0201d511cb9fe6ba743a77aab2255;hpb=c90a093af5607c80a76a7af50f76d2c1d5bf4f37;p=civicrm-core.git diff --git a/CRM/Event/Info.php b/CRM/Event/Info.php index 21c7a110df..1d6d2d0f05 100644 --- a/CRM/Event/Info.php +++ b/CRM/Event/Info.php @@ -41,6 +41,9 @@ class CRM_Event_Info extends CRM_Core_Component_Info { protected $keyword = 'event'; // docs inherited from interface + /** + * @return array + */ public function getInfo() { return array( 'name' => 'CiviEvent', @@ -52,6 +55,11 @@ class CRM_Event_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @param bool $getAllUnconditionally + * + * @return array + */ public function getPermissions($getAllUnconditionally = FALSE) { return array( 'access CiviEvent', @@ -64,7 +72,19 @@ class CRM_Event_Info extends CRM_Core_Component_Info { ); } + /** + * @return array + */ + public function getAnonymousPermissionWarnings() { + return array( + 'access CiviEvent', + ); + } + // docs inherited from interface + /** + * @return array + */ public function getUserDashboardElement() { return array('name' => ts('Events'), 'title' => ts('Your Event(s)'), @@ -74,6 +94,9 @@ class CRM_Event_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function registerTab() { return array('title' => ts('Events'), 'id' => 'participant', @@ -83,6 +106,9 @@ class CRM_Event_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function registerAdvancedSearchPane() { return array('title' => ts('Events'), 'weight' => 40, @@ -90,6 +116,9 @@ class CRM_Event_Info extends CRM_Core_Component_Info { } // docs inherited from interface + /** + * @return array + */ public function getActivityTypes() { $types = array(); $types['Event'] = array('title' => ts('Event'), @@ -99,25 +128,30 @@ class CRM_Event_Info extends CRM_Core_Component_Info { } // add shortcut to Create New + /** + * @param $shortCuts + * @param $newCredit + */ public function creatNewShortcut(&$shortCuts, $newCredit) { if (CRM_Core_Permission::check('access CiviEvent') && CRM_Core_Permission::check('edit event participants') ) { - $shortCuts = array_merge($shortCuts, array( - array('path' => 'civicrm/participant/add', - 'query' => "reset=1&action=add&context=standalone", - 'ref' => 'new-participant', - 'title' => ts('Event Registration'), - ))); + $shortCut[] = array( + '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') . ')'; - $shortCuts = array_merge($shortCuts, array( - array('path' => 'civicrm/participant/add', - 'query' => "reset=1&action=add&context=standalone&mode=live", - 'ref' => 'new-participant-cc', - 'title' => $title, - ))); + $shortCut[0]['shortCuts'][] = array( + 'path' => 'civicrm/participant/add', + 'query' => "reset=1&action=add&context=standalone&mode=live", + 'ref' => 'new-participant-cc', + 'title' => $title, + ); } + $shortCuts = array_merge($shortCuts, $shortCut); } } }