本文整理汇总了PHP中CRM_Core_Controller::getButtonName方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Controller::getButtonName方法的具体用法?PHP CRM_Core_Controller::getButtonName怎么用?PHP CRM_Core_Controller::getButtonName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Controller
的用法示例。
在下文中一共展示了CRM_Core_Controller::getButtonName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mainProcess
/**
* just a wrapper, so that we can call all the hook functions
* @param bool $allowAjax
* FIXME: This feels kind of hackish, ideally we would take the json-related code from this function.
* and bury it deeper down in the controller
*/
public function mainProcess($allowAjax = TRUE)
{
$this->postProcess();
$this->postProcessHook();
// Respond with JSON if in AJAX context (also support legacy value '6')
if ($allowAjax && !empty($_REQUEST['snippet']) && in_array($_REQUEST['snippet'], array(CRM_Core_Smarty::PRINT_JSON, 6))) {
$this->ajaxResponse['buttonName'] = str_replace('_qf_' . $this->getAttribute('id') . '_', '', $this->controller->getButtonName());
$this->ajaxResponse['action'] = $this->_action;
if (isset($this->_id) || isset($this->id)) {
$this->ajaxResponse['id'] = isset($this->id) ? $this->id : $this->_id;
}
CRM_Core_Page_AJAX::returnJsonResponse($this->ajaxResponse);
}
}