<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* abstract class.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
protected $keyword = 'event';
// docs inherited from interface
+ /**
+ * @return array
+ */
public function getInfo() {
return array(
'name' => 'CiviEvent',
}
// docs inherited from interface
+ /**
+ * @param bool $getAllUnconditionally
+ *
+ * @return array
+ */
public function getPermissions($getAllUnconditionally = FALSE) {
return array(
'access CiviEvent',
);
}
+ /**
+ * @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)'),
}
// docs inherited from interface
+ /**
+ * @return array
+ */
public function registerTab() {
return array('title' => ts('Events'),
'id' => 'participant',
}
// docs inherited from interface
+ /**
+ * @return array
+ */
public function registerAdvancedSearchPane() {
return array('title' => ts('Events'),
'weight' => 40,
}
// docs inherited from interface
+ /**
+ * @return array
+ */
public function getActivityTypes() {
$types = array();
$types['Event'] = array('title' => ts('Event'),
}
// 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') . '<br /> (' . 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);
}
}
}