X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FExtension%2FManager%2FReport.php;h=da14a38b2129b8ec916f779442cd9a5861a3a7e5;hb=f7625c246cd90c0aea6571706429c306dbe19bea;hp=bd8b5d67a7477e42bd72a32bba535506aa84af01;hpb=889a9fea7a958867f58a84ec92da444f7ac52956;p=civicrm-core.git diff --git a/CRM/Extension/Manager/Report.php b/CRM/Extension/Manager/Report.php index bd8b5d67a7..da14a38b21 100644 --- a/CRM/Extension/Manager/Report.php +++ b/CRM/Extension/Manager/Report.php @@ -24,7 +24,10 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { */ public function __construct() { parent::__construct(TRUE); - $this->groupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', + } + + public function getGroupId() { + return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', self::REPORT_GROUP_NAME, 'id', 'name' ); } @@ -51,7 +54,7 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { throw new CRM_Core_Exception(ts('Component for which you are trying to install the extension (%1) is currently disabled.', [1 => $info->typeInfo['component']])); } $weight = CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue', - ['option_group_id' => $this->groupId] + ['option_group_id' => $this->getGroupId()] ); $params = [ 'label' => $info->label . ' (' . $info->key . ')', @@ -60,7 +63,7 @@ class CRM_Extension_Manager_Report extends CRM_Extension_Manager_Base { 'weight' => $weight, 'description' => $info->label . ' (' . $info->key . ')', 'component_id' => $compId, - 'option_group_id' => $this->groupId, + 'option_group_id' => $this->getGroupId(), 'is_active' => 1, ];