本文整理汇总了PHP中ActivityModel::find_all_incidences方法的典型用法代码示例。如果您正苦于以下问题:PHP ActivityModel::find_all_incidences方法的具体用法?PHP ActivityModel::find_all_incidences怎么用?PHP ActivityModel::find_all_incidences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActivityModel
的用法示例。
在下文中一共展示了ActivityModel::find_all_incidences方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: report_build
/**
* Builds a report using the passed parameters, and displays the result
* using the report show view
*
* @param Array $params
*/
public function report_build($params)
{
$formdata = (object) $params;
$this->_data->range = IntervalModel::get_range_total($formdata);
$this->_data->intervals = IntervalModel::get_between($formdata);
$this->_data->incidences = ActivityModel::find_all_incidences($formdata->user);
new UserReportShowView($this->_data);
}
示例2: report_build
/**
* Builds a report using the passed parameters, and displays the result
* using the report show view
*
* @param Array $params
*/
public function report_build($params)
{
global $STRINGS;
$formdata = (object) $params;
$this->_data->user = UserModel::find($formdata->user);
$this->_data->range = IntervalModel::get_range_total($formdata);
$this->_data->intervals = IntervalModel::get_between($formdata);
$this->_data->incidences = ActivityModel::find_all_incidences($formdata->user);
//check if the report is not empty
if (empty($this->_data->range->total) && empty($this->_data->intervals) && empty($this->_data->incidences)) {
$alert = BootstrapHelper::alert('info', $STRINGS['event:noactivity'], $STRINGS['event:noactivityinterval:message']);
new AdminReportView(UserModel::find_all(), $alert);
} else {
new AdminReportShowView($this->_data);
}
}