本文整理汇总了PHP中CRM_Core_OptionValue::getRows方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_OptionValue::getRows方法的具体用法?PHP CRM_Core_OptionValue::getRows怎么用?PHP CRM_Core_OptionValue::getRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_OptionValue
的用法示例。
在下文中一共展示了CRM_Core_OptionValue::getRows方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: browse
/**
* Browse all options
*
*
* @return void
* @access public
* @static
*/
function browse()
{
$campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
$groupParams = array('name' => $this->_gName);
$optionValues = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
foreach ($optionValues as $key => $optionValue) {
if (CRM_Utils_Array::value('component_id', $optionValue) != $campaingCompId) {
unset($optionValues[$key]);
}
}
$returnURL = CRM_Utils_System::url("civicrm/admin/campaign/surveyType", "reset=1");
$filter = "option_group_id = " . $this->_gid;
CRM_Utils_Weight::addOrder($optionValues, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
$this->assign('rows', $optionValues);
}
示例2: browse
/**
* Browse all options.
*/
public function browse()
{
$groupParams = array('name' => self::$_gName);
$optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'weight');
$gName = self::$_gName;
$returnURL = CRM_Utils_System::url("civicrm/admin/report/options/{$gName}", "reset=1");
$filter = "option_group_id = " . self::$_gId;
$session = new CRM_Core_Session();
$session->replaceUserContext($returnURL);
CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
$this->assign('rows', $optionValue);
}
示例3: browse
/**
* Browse all options
*
*
* @return void
* @access public
* @static
*/
function browse()
{
require_once 'CRM/Core/OptionValue.php';
$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;
require_once 'CRM/Utils/Weight.php';
CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
$this->assign('rows', $optionValue);
}
示例4: browse
/**
* 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);
}
示例5: _discoverInstalled
/**
* Searches for and returnes installed extensions.
*
* @access private
* @param boolean $fullInfo provide full info (read XML files) if true, otherwise only DB stored data
* @return array list of extensions
*/
private function _discoverInstalled($fullInfo = FALSE)
{
require_once 'CRM/Core/OptionValue.php';
require_once 'CRM/Core/Extensions/Extension.php';
$result = array();
$groupParams = array('name' => self::OPTION_GROUP_NAME);
$links = array();
$ov = CRM_Core_OptionValue::getRows($groupParams, $links);
foreach ($ov as $id => $entry) {
$ext = new CRM_Core_Extensions_Extension($entry['value'], $entry['grouping'], $entry['name'], $entry['label'], $entry['description'], $entry['is_active']);
$ext->setId($id);
if ($fullInfo) {
$ext->readXMLInfo();
}
$result[$id] = $ext;
}
return $result;
}
示例6: browse
/**
* 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);
}