本文整理汇总了PHP中CRM_Core_BAO_OptionValue::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_OptionValue::getTitle方法的具体用法?PHP CRM_Core_BAO_OptionValue::getTitle怎么用?PHP CRM_Core_BAO_OptionValue::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_OptionValue
的用法示例。
在下文中一共展示了CRM_Core_BAO_OptionValue::getTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* edit custom Option.
*
* editing would involved modifying existing fields + adding data to new fields.
*
* @param string $action the action to be invoked
*
* @return void
* @access public
*/
function edit($action)
{
$oid = CRM_Utils_Request::retrieve('oid', 'Positive', $this, false, 0);
$params = array();
if ($oid) {
$params['oid'] = $oid;
require_once 'CRM/Price/BAO/Set.php';
$sid = CRM_Price_BAO_Set::getSetId($params);
require_once 'CRM/Price/BAO/Set.php';
$usedBy =& CRM_Price_BAO_Set::getUsedBy($sid);
}
// set the userContext stack
$session =& CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin/price/field/option', "reset=1&action=browse&fid={$this->_fid}&sid={$this->_sid}"));
$controller =& new CRM_Core_Controller_Simple('CRM_Price_Form_Option', ts('Price Field Option'), $action);
$controller->set('fid', $this->_fid);
$controller->setEmbedded(true);
$controller->process();
$controller->run();
$this->browse();
if ($action & CRM_Core_Action::DELETE) {
// add breadcrumb
require_once 'CRM/Core/BAO/OptionValue.php';
$url = CRM_Utils_System::url('civicrm/admin/price/field/option', 'reset=1');
CRM_Utils_System::appendBreadCrumb(ts('Price Option'), $url);
$this->assign('usedPriceSetTitle', CRM_Core_BAO_OptionValue::getTitle($oid));
$this->assign('usedBy', $usedBy);
}
}