本文整理汇总了PHP中ProjectTasks::getOverdueAndUpcomingObjects方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectTasks::getOverdueAndUpcomingObjects方法的具体用法?PHP ProjectTasks::getOverdueAndUpcomingObjects怎么用?PHP ProjectTasks::getOverdueAndUpcomingObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectTasks
的用法示例。
在下文中一共展示了ProjectTasks::getOverdueAndUpcomingObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lang
}
$widget_title = lang('late tasks and upcoming tasks') . ' ' . lang('in') . ' ' . implode(", ", $mnames);
}
$assigned_to_user = null;
$w_option_assigned_to = ContactWidgetOptions::instance()->getContactOption('overdue_upcoming', logged_user()->getId(), 'assigned_to_user');
if (array_var($w_option_assigned_to, 'value')) {
$assigned_to_user = array_var($w_option_assigned_to, 'value');
}
// Not due tasks
$not_due_tasks = ProjectTasks::getUpcomingWithoutDate($not_overdue_limit + 1, $assigned_to_user);
if (count($not_due_tasks) > $not_overdue_limit) {
$show_more = true;
array_pop($not_due_tasks);
}
// Due Tasks
$overdue_upcoming_objects = ProjectTasks::getOverdueAndUpcomingObjects($overdue_limit + 1, $assigned_to_user);
// FIXME: performance Killer
if (count($overdue_upcoming_objects) > $overdue_limit) {
$show_more = true;
array_pop($overdue_upcoming_objects);
}
$overdue_upcoming_objects = array_merge($not_due_tasks, $overdue_upcoming_objects);
$users = array();
if (count($overdue_upcoming_objects) > 0) {
// Render only when the context isnt 'all' and you have perms
$render_add = active_context_members(false) && ProjectTask::canAdd(logged_user(), active_context());
if ($render_add) {
$users[] = array(0, lang('dont assign'));
foreach (allowed_users_to_assign() as $company) {
foreach ($company['users'] as $user) {
$name = logged_user()->getId() == $user['id'] ? lang('me') : $user['name'];
示例2: array_pop
<?php
$not_overdue_limit = 5;
$overdue_limit = 20;
$show_more = false;
// Not due tasks
$not_due_tasks = ProjectTasks::getUpcomingWithoutDate($not_overdue_limit + 1);
if (count($not_due_tasks) > $not_overdue_limit) {
$show_more = true;
array_pop($not_due_tasks);
}
// Due Tasks
$overdue_upcoming_objects = ProjectTasks::getOverdueAndUpcomingObjects($overdue_limit + 1);
// FIXME: performance Killer
if (count($overdue_upcoming_objects) > $overdue_limit) {
$show_more = true;
array_pop($overdue_upcoming_objects);
}
$overdue_upcoming_objects = array_merge($not_due_tasks, $overdue_upcoming_objects);
$users = array();
// Render only when the context isnt 'all' and you have perms
$render_add = active_context_members(false) && ProjectTask::canAdd(logged_user(), active_context());
if ($render_add) {
$users[] = array(0, lang('dont assign'));
foreach (allowed_users_to_assign() as $company) {
foreach ($company['users'] as $user) {
$name = logged_user()->getId() == $user['id'] ? lang('me') : $user['name'];
$users[] = array($user['id'], $name);
}
}
}
示例3: clean
foreach ($active_members as $member) {
$mnames[] = clean($member->getName());
}
$widget_title = lang('late tasks and upcoming tasks'). ' '. lang('in').' '. implode(", ", $mnames);
}
// Not due tasks
$not_due_tasks = ProjectTasks::getUpcomingWithoutDate($not_overdue_limit+1);
if ( count($not_due_tasks) > $not_overdue_limit ) {
$show_more = true;
array_pop($not_due_tasks);
}
// Due Tasks
$overdue_upcoming_objects = ProjectTasks::getOverdueAndUpcomingObjects ($overdue_limit+1); // FIXME: performance Killer
if ( count($overdue_upcoming_objects) > $overdue_limit ) {
$show_more = true;
array_pop($overdue_upcoming_objects);
}
$overdue_upcoming_objects = array_merge($not_due_tasks, $overdue_upcoming_objects);
$users = array();
if (count($overdue_upcoming_objects) > 0) {
// Render only when the context isnt 'all' and you have perms
$render_add = active_context_members(false) && ProjectTask::canAdd(logged_user(), active_context());
if ($render_add) {
$users[] = array(0, lang('dont assign'));
foreach ( allowed_users_to_assign() as $company ){