3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2014 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * This class introduces component to the system and provides all the
30 * information about it. It needs to extend CRM_Core_Component_Info
34 * @copyright CiviCRM LLC (c) 2004-2014
38 class CRM_Campaign_Info
extends CRM_Core_Component_Info
{
43 protected $keyword = 'campaign';
49 public function getInfo() {
51 'name' => 'CiviCampaign',
52 'translatedName' => ts('CiviCampaign'),
53 'title' => 'CiviCRM Campaign Engine',
55 'showActivitiesInCore' => 1,
62 * @param bool $getAllUnconditionally
66 public function getPermissions($getAllUnconditionally = FALSE) {
68 'administer CiviCampaign',
70 'reserve campaign contacts',
71 'release campaign contacts',
72 'interview campaign contacts',
73 'gotv campaign contacts',
74 'sign CiviCRM Petition',
83 public function getUserDashboardElement() {
84 // no dashboard element for this component
91 public function getUserDashboardObject() {
92 // no dashboard element for this component
100 public function registerTab() {
101 // this component doesn't use contact record tabs
109 public function registerAdvancedSearchPane() {
110 // this component doesn't use advanced search
117 public function getActivityTypes() {
122 * add shortcut to Create New
125 public function creatNewShortcut(&$shortCuts) {
126 if (CRM_Core_Permission
::check('manage campaign') ||
127 CRM_Core_Permission
::check('administer CiviCampaign')
129 $shortCuts = array_merge($shortCuts, array(
131 'path' => 'civicrm/campaign/add',
132 'query' => "reset=1&action=add",
133 'ref' => 'new-campaign',
134 'title' => ts('Campaign'),
137 'path' => 'civicrm/survey/add',
138 'query' => "reset=1&action=add",
139 'ref' => 'new-survey',
140 'title' => ts('Survey'),