<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* This class stores logic for managing CiviCRM extensions.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
*/
class CRM_Extension_Manager_Search extends CRM_Extension_Manager_Base {
- /**
- *
- */
const CUSTOM_SEARCH_GROUP_NAME = 'custom_search';
- /**
- *
- */
public function __construct() {
parent::__construct(TRUE);
$this->groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup',
CRM_Core_Error::fatal('This custom search is not registered.');
}
- $cs = $this->getCustomSearchesById();
- $id = $cs[$customSearchesByName[$info->key]];
+ $cs = $this->getCustomSearchesById();
+ $id = $cs[$customSearchesByName[$info->key]];
$optionValue = CRM_Core_BAO_OptionValue::del($id);
return TRUE;
*/
public function onPreDisable(CRM_Extension_Info $info) {
$customSearchesByName = $this->getCustomSearchesByName();
- $cs = $this->getCustomSearchesById();
- $id = $cs[$customSearchesByName[$info->key]];
+ $cs = $this->getCustomSearchesById();
+ $id = $cs[$customSearchesByName[$info->key]];
$optionValue = CRM_Core_BAO_OptionValue::setIsActive($id, 0);
}
*/
public function onPreEnable(CRM_Extension_Info $info) {
$customSearchesByName = $this->getCustomSearchesByName();
- $cs = $this->getCustomSearchesById();
- $id = $cs[$customSearchesByName[$info->key]];
+ $cs = $this->getCustomSearchesById();
+ $id = $cs[$customSearchesByName[$info->key]];
$optionValue = CRM_Core_BAO_OptionValue::setIsActive($id, 1);
}
protected function getCustomSearchesById() {
return CRM_Core_OptionGroup::values(self::CUSTOM_SEARCH_GROUP_NAME, FALSE, FALSE, FALSE, NULL, 'id', FALSE, TRUE);
}
+
}