/** * Browse all options * * * @return void * @access public * @static */ function browse() { if (!self::$_gName) { return parent::browse(); } CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js'); $groupParams = array('name' => self::$_gName); $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight'); $gName = self::$_gName; $returnURL = CRM_Utils_System::url("civicrm/admin/options/{$gName}", "reset=1&group={$gName}"); $filter = "option_group_id = " . self::$_gId; CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter); // retrieve financial account name for the payment instrument page if ($gName = "payment_instrument") { foreach ($optionValue as $key => $option) { $optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value'); } } $this->assign('includeWysiwygEditor', TRUE); $this->assign('rows', $optionValue); }
/** * Browse all options. * * * @return void */ public function browse() { if (!self::$_gName) { return parent::browse(); } $groupParams = array('name' => self::$_gName); $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight'); $gName = self::$_gName; $returnURL = CRM_Utils_System::url("civicrm/admin/options/{$gName}", "reset=1&group={$gName}"); $filter = "option_group_id = " . self::$_gId; CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter); // retrieve financial account name for the payment method page if ($gName = "payment_instrument") { foreach ($optionValue as $key => $option) { $optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value'); } } $this->assign('rows', $optionValue); }