'CiviGrant', 'translatedName' => ts('CiviGrant'), 'title' => 'CiviCRM Grant Management Engine', 'path' => 'CRM_Grant_', 'search' => 1, 'showActivitiesInCore' => 1, ); } // docs inherited from interface /** * @param bool $getAllUnconditionally * * @return array */ public function getPermissions($getAllUnconditionally = FALSE) { return array( 'access CiviGrant', 'edit grants', 'delete in CiviGrant', ); } // docs inherited from interface /** * @return null */ public function getUserDashboardElement() { // no dashboard element for this component return NULL; } // docs inherited from interface /** * @return null */ public function getUserDashboardObject() { // no dashboard element for this component return NULL; } // docs inherited from interface /** * @return array */ public function registerTab() { return array('title' => ts('Grants'), 'url' => 'grant', 'weight' => 50, ); } // docs inherited from interface /** * @return array */ public function registerAdvancedSearchPane() { return array('title' => ts('Grants'), 'weight' => 50, ); } // docs inherited from interface /** * @return null */ public function getActivityTypes() { return NULL; } // add shortcut to Create New /** * @param $shortCuts */ public function creatNewShortcut(&$shortCuts) { if (CRM_Core_Permission::check('access CiviGrant') && CRM_Core_Permission::check('edit grants') ) { $shortCuts = array_merge($shortCuts, array( array('path' => 'civicrm/grant/add', 'query' => "reset=1&action=add&context=standalone", 'ref' => 'new-grant', 'title' => ts('Grant'), ))); } } }