Beispiel #1
0
 /**
  * Get tab  Links for events.
  *
  * @param $enableCart
  *
  * @return array
  *   (reference) of tab links
  */
 public static function &tabs($enableCart)
 {
     $cacheKey = $enableCart ? 1 : 0;
     if (!self::$_tabLinks) {
         self::$_tabLinks = array();
     }
     if (!isset(self::$_tabLinks[$cacheKey])) {
         self::$_tabLinks[$cacheKey]['settings'] = array('title' => ts('Info and Settings'), 'url' => 'civicrm/event/manage/settings', 'field' => 'id');
         self::$_tabLinks[$cacheKey]['location'] = array('title' => ts('Location'), 'url' => 'civicrm/event/manage/location', 'field' => 'loc_block_id');
         self::$_tabLinks[$cacheKey]['fee'] = array('title' => ts('Fees'), 'url' => 'civicrm/event/manage/fee', 'field' => 'is_monetary');
         self::$_tabLinks[$cacheKey]['registration'] = array('title' => ts('Online Registration'), 'url' => 'civicrm/event/manage/registration', 'field' => 'is_online_registration');
         if (CRM_Core_Permission::check('administer CiviCRM') || CRM_Event_BAO_Event::checkPermission(NULL, CRM_Core_Permission::EDIT)) {
             self::$_tabLinks[$cacheKey]['reminder'] = array('title' => ts('Schedule Reminders'), 'url' => 'civicrm/event/manage/reminder', 'field' => 'reminder');
         }
         self::$_tabLinks[$cacheKey]['conference'] = array('title' => ts('Conference Slots'), 'url' => 'civicrm/event/manage/conference', 'field' => 'slot_label_id');
         self::$_tabLinks[$cacheKey]['friend'] = array('title' => ts('Tell a Friend'), 'url' => 'civicrm/event/manage/friend', 'field' => 'friend');
         self::$_tabLinks[$cacheKey]['pcp'] = array('title' => ts('Personal Campaign Pages'), 'url' => 'civicrm/event/manage/pcp', 'field' => 'is_pcp_enabled');
         self::$_tabLinks[$cacheKey]['repeat'] = array('title' => ts('Repeat'), 'url' => 'civicrm/event/manage/repeat', 'field' => 'is_repeating_event');
     }
     if (!$enableCart) {
         unset(self::$_tabLinks[$cacheKey]['conference']);
     }
     CRM_Utils_Hook::tabset('civicrm/event/manage', self::$_tabLinks[$cacheKey], array());
     return self::$_tabLinks[$cacheKey];
 }
Beispiel #2
0
 /**
  * Get tab  Links for events
  *
  * @return array (reference) of tab links
  */
 static function &tabs($enableCart)
 {
     $cacheKey = $enableCart ? 1 : 0;
     if (!self::$_tabLinks) {
         self::$_tabLinks = array();
     }
     if (!isset(self::$_tabLinks[$cacheKey])) {
         self::$_tabLinks[$cacheKey] = array('settings' => array('title' => ts('Info and Settings'), 'url' => 'civicrm/event/manage/settings', 'field' => 'id'), 'location' => array('title' => ts('Location'), 'url' => 'civicrm/event/manage/location', 'field' => 'loc_block_id'), 'fee' => array('title' => ts('Fees'), 'url' => 'civicrm/event/manage/fee', 'field' => 'is_monetary'), 'registration' => array('title' => ts('Online Registration'), 'url' => 'civicrm/event/manage/registration', 'field' => 'is_online_registration'), 'reminder' => array('title' => ts('Schedule Reminders'), 'url' => 'civicrm/event/manage/reminder', 'field' => 'reminder'), 'conference' => array('title' => ts('Conference Slots'), 'url' => 'civicrm/event/manage/conference', 'field' => 'slot_label_id'), 'friend' => array('title' => ts('Tell a Friend'), 'url' => 'civicrm/event/manage/friend', 'field' => 'friend'), 'pcp' => array('title' => ts('Personal Campaign Pages'), 'url' => 'civicrm/event/manage/pcp', 'field' => 'is_pcp_enabled'));
     }
     if (!$enableCart) {
         unset(self::$_tabLinks[$cacheKey]['conference']);
     }
     CRM_Utils_Hook::tabset('civicrm/event/manage', self::$_tabLinks[$cacheKey], array());
     return self::$_tabLinks[$cacheKey];
 }