| 1 | <?php |
| 2 | /* |
| 3 | +--------------------------------------------------------------------+ |
| 4 | | CiviCRM version 4.6 | |
| 5 | +--------------------------------------------------------------------+ |
| 6 | | Copyright CiviCRM LLC (c) 2004-2014 | |
| 7 | +--------------------------------------------------------------------+ |
| 8 | | This file is a part of CiviCRM. | |
| 9 | | | |
| 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. | |
| 13 | | | |
| 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. | |
| 18 | | | |
| 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 | +--------------------------------------------------------------------+ |
| 26 | */ |
| 27 | |
| 28 | |
| 29 | |
| 30 | require_once 'CRM/Core/Component/Info.php'; |
| 31 | |
| 32 | /** |
| 33 | * This class introduces component to the system and provides all the |
| 34 | * information about it. It needs to extend CRM_Core_Component_Info |
| 35 | * abstract class. |
| 36 | * |
| 37 | * @package CRM |
| 38 | * @copyright CiviCRM LLC (c) 2004-2014 |
| 39 | * $Id$ |
| 40 | * |
| 41 | */ |
| 42 | class CRM_Touchstone_Info extends CRM_Core_Component_Info { |
| 43 | |
| 44 | // docs inherited from interface |
| 45 | protected $keyword = 'touchstone'; |
| 46 | |
| 47 | // docs inherited from interface |
| 48 | /** |
| 49 | * Provides base information about the component. |
| 50 | * Needs to be implemented in component's information |
| 51 | * class. |
| 52 | * |
| 53 | * @return array collection of required component settings |
| 54 | * @access public |
| 55 | * |
| 56 | */ |
| 57 | public function getInfo() { |
| 58 | return array('name' => 'CiviTouchstone', |
| 59 | 'translatedName' => ts('CiviTouchstone'), |
| 60 | 'title' => ts('CiviCRM Touchstone Component'), |
| 61 | 'search' => 1, |
| 62 | ); |
| 63 | } |
| 64 | |
| 65 | // docs inherited from interface |
| 66 | /** |
| 67 | * @return array |
| 68 | */ |
| 69 | public function getPermissions() { |
| 70 | return array('access CiviTouchstone'); |
| 71 | } |
| 72 | |
| 73 | // docs inherited from interface |
| 74 | /** |
| 75 | * Provides information about user dashboard element |
| 76 | * offered by this component. |
| 77 | * |
| 78 | * @return array|null collection of required dashboard settings, |
| 79 | * null if no element offered |
| 80 | * @access public |
| 81 | * |
| 82 | */ |
| 83 | public function getUserDashboardElement() { |
| 84 | return array('name' => ts('Touchstone'), |
| 85 | 'title' => ts('Your Touchstone'), |
| 86 | 'perm' => array('access CiviTouchstone'), |
| 87 | 'weight' => 85, |
| 88 | ); |
| 89 | } |
| 90 | |
| 91 | // docs inherited from interface |
| 92 | /** |
| 93 | * Provides information about user dashboard element |
| 94 | * offered by this component. |
| 95 | * |
| 96 | * @return array|null collection of required dashboard settings, |
| 97 | * null if no element offered |
| 98 | * @access public |
| 99 | * |
| 100 | */ |
| 101 | public function registerTab() { |
| 102 | return array('title' => ts('Touchstone'), |
| 103 | 'url' => 'touchstone', |
| 104 | 'weight' => 25, |
| 105 | ); |
| 106 | } |
| 107 | |
| 108 | // docs inherited from interface |
| 109 | /** |
| 110 | * Provides information about advanced search pane |
| 111 | * offered by this component. |
| 112 | * |
| 113 | * @return array|null collection of required pane settings, |
| 114 | * null if no element offered |
| 115 | * @access public |
| 116 | * |
| 117 | */ |
| 118 | public function registerAdvancedSearchPane() { |
| 119 | return array('title' => ts('Touchstone'), |
| 120 | 'weight' => 25, |
| 121 | ); |
| 122 | } |
| 123 | |
| 124 | // docs inherited from interface |
| 125 | /** |
| 126 | * Provides potential activity types that this |
| 127 | * component might want to register in activity history. |
| 128 | * Needs to be implemented in component's information |
| 129 | * class. |
| 130 | * |
| 131 | * @return array|null collection of activity types |
| 132 | * @access public |
| 133 | * |
| 134 | */ |
| 135 | public function getActivityTypes() { |
| 136 | return NULL; |
| 137 | } |
| 138 | |
| 139 | // add shortcut to Create New |
| 140 | /** |
| 141 | * @param $shortCuts |
| 142 | */ |
| 143 | public function creatNewShortcut(&$shortCuts) {} |
| 144 | } |
| 145 | |