当前位置: 首页>>代码示例>>PHP>>正文


PHP ProjectTasks::getOverdueAndUpcomingObjects方法代码示例

本文整理汇总了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'];
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:index.php

示例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);
        }
    }
}
开发者ID:rorteg,项目名称:fengoffice,代码行数:31,代码来源:index.php

示例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 ){
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:index.php


注:本文中的ProjectTasks::getOverdueAndUpcomingObjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。