本文整理汇总了PHP中ApplicationLogs::getProjectLogs方法的典型用法代码示例。如果您正苦于以下问题:PHP ApplicationLogs::getProjectLogs方法的具体用法?PHP ApplicationLogs::getProjectLogs怎么用?PHP ApplicationLogs::getProjectLogs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationLogs
的用法示例。
在下文中一共展示了ApplicationLogs::getProjectLogs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Show dashboard index page
*
* @param void
* @return null
*/
function index()
{
trace(__FILE__, 'index() - begin');
$logged_user = logged_user();
$active_projects = $logged_user->getActiveProjects();
$activity_log = null;
$projects_activity_log = array();
if (is_array($active_projects) && count($active_projects)) {
$include_private = $logged_user->isMemberOfOwnerCompany();
$include_silent = $logged_user->isAdministrator();
$project_ids = array();
foreach ($active_projects as $active_project) {
$project_ids[] = $active_project->getId();
$temp_project_logs = ApplicationLogs::getProjectLogs($active_project, $include_private, $include_silent, config_option('dashboard_project_logs_count', 7));
if (isset($temp_project_logs) && is_array($temp_project_logs) && count($temp_project_logs)) {
$projects_activity_log[$temp_project_logs[0]->getCreatedOn()->getTimestamp()] = $temp_project_logs;
}
krsort($projects_activity_log);
}
// if
$activity_log = ApplicationLogs::getOverallLogs($include_private, $include_silent, $project_ids, config_option('dashboard_logs_count', 15));
}
// if
trace(__FILE__, 'index() - tpl_assign...');
tpl_assign('today_milestones', $logged_user->getTodayMilestones());
tpl_assign('late_milestones', $logged_user->getLateMilestones());
tpl_assign('active_projects', $active_projects);
tpl_assign('activity_log', $activity_log);
tpl_assign('projects_activity_log', $projects_activity_log);
// Sidebar
tpl_assign('online_users', Users::getWhoIsOnline());
tpl_assign('my_projects', $active_projects);
$this->setSidebar(get_template_path('index_sidebar', 'dashboard'));
trace(__FILE__, 'index() - end');
}
示例2: getProjectLog
/**
* Return all project log entries that this user can see
*
* @param integer $limit Number of logs that will be returned
* @param integer $offset Return from this record
* @return array
*/
function getProjectLog($limit = null, $offset = null)
{
$include_private = logged_user()->isMemberOfOwnerCompany();
$include_silent = logged_user()->isAdministrator();
return ApplicationLogs::getProjectLogs($this, $include_private, $include_silent, $limit, $offset);
}