本文整理汇总了PHP中CRM_Price_BAO_PriceSet::eventPriceSetDomainID方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Price_BAO_PriceSet::eventPriceSetDomainID方法的具体用法?PHP CRM_Price_BAO_PriceSet::eventPriceSetDomainID怎么用?PHP CRM_Price_BAO_PriceSet::eventPriceSetDomainID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Price_BAO_PriceSet
的用法示例。
在下文中一共展示了CRM_Price_BAO_PriceSet::eventPriceSetDomainID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: browse
/**
* Browse all price sets
*
* @param string $action the action to be invoked
*
* @return void
* @access public
*/
function browse($action = NULL)
{
// get all price sets
$priceSet = array();
$comps = array('CiviEvent' => ts('Event'), 'CiviContribute' => ts('Contribution'), 'CiviMember' => ts('Membership'));
$dao = new CRM_Price_DAO_PriceSet();
if (CRM_Price_BAO_PriceSet::eventPriceSetDomainID()) {
$dao->domain_id = CRM_Core_Config::domainID();
}
$dao->is_quick_config = 0;
$dao->find();
while ($dao->fetch()) {
$priceSet[$dao->id] = array();
CRM_Core_DAO::storeValues($dao, $priceSet[$dao->id]);
$compIds = explode(CRM_Core_DAO::VALUE_SEPARATOR, CRM_Utils_Array::value('extends', $priceSet[$dao->id]));
$extends = array();
//CRM-10225
foreach ($compIds as $compId) {
if (!empty($comps[CRM_Core_Component::getComponentName($compId)])) {
$extends[] = $comps[CRM_Core_Component::getComponentName($compId)];
}
}
$priceSet[$dao->id]['extends'] = implode(', ', $extends);
// form all action links
$action = array_sum(array_keys($this->actionLinks()));
// update enable/disable links depending on price_set properties.
if ($dao->is_reserved) {
$action -= CRM_Core_Action::UPDATE + CRM_Core_Action::DISABLE + CRM_Core_Action::ENABLE + CRM_Core_Action::DELETE + CRM_Core_Action::COPY;
} else {
if ($dao->is_active) {
$action -= CRM_Core_Action::ENABLE;
} else {
$action -= CRM_Core_Action::DISABLE;
}
}
$actionLinks = self::actionLinks();
//CRM-10117
if ($dao->is_reserved) {
$actionLinks[CRM_Core_Action::BROWSE]['name'] = 'View Price Fields';
}
$priceSet[$dao->id]['action'] = CRM_Core_Action::formLink($actionLinks, $action, array('sid' => $dao->id), ts('more'), FALSE, 'priceSet.row.actions', 'PriceSet', $dao->id);
}
$this->assign('rows', $priceSet);
}