本文整理汇总了PHP中CRM_Campaign_BAO_Survey::getSurveyCount方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Campaign_BAO_Survey::getSurveyCount方法的具体用法?PHP CRM_Campaign_BAO_Survey::getSurveyCount怎么用?PHP CRM_Campaign_BAO_Survey::getSurveyCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Campaign_BAO_Survey
的用法示例。
在下文中一共展示了CRM_Campaign_BAO_Survey::getSurveyCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: browseSurvey
/**
* @return mixed
*/
public function browseSurvey()
{
// ensure valid javascript - this must have a value set
$this->assign('searchParams', json_encode(NULL));
$this->assign('surveyTypes', json_encode(NULL));
$this->assign('surveyCampaigns', json_encode(NULL));
$this->assign('addSurveyUrl', CRM_Utils_System::url('civicrm/survey/add', 'reset=1&action=add'));
$surveyCount = CRM_Campaign_BAO_Survey::getSurveyCount();
//don't load find interface when no survey in db.
if (!$surveyCount) {
$this->assign('hasSurveys', FALSE);
return;
}
$this->assign('hasSurveys', TRUE);
//build the ajaxify survey search and selector.
$controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Search_Survey', ts('Search Survey'));
$controller->set('searchTab', 'survey');
$controller->setEmbedded(TRUE);
$controller->process();
return $controller->run();
}