本文整理汇总了PHP中ProjectTasks::getRangeTasksByUser方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectTasks::getRangeTasksByUser方法的具体用法?PHP ProjectTasks::getRangeTasksByUser怎么用?PHP ProjectTasks::getRangeTasksByUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectTasks
的用法示例。
在下文中一共展示了ProjectTasks::getRangeTasksByUser方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: active_context
$today = DateTimeValueLib::now();
//user today
// $today->add('h', logged_user()->getTimezone());
$currentday = $today->format("j");
$currentmonth = $today->format("n");
$currentyear = $today->format("Y");
$drawHourLine = $day == $currentday && $month == $currentmonth && $year == $currentyear;
$dtv = DateTimeValueLib::make(0, 0, 0, $month, $day, $year);
$result = ProjectEvents::getDayProjectEvents($dtv, active_context(), $user_filter, $status_filter);
if (!$result) {
$result = array();
}
$alldayevents = array();
$milestones = ProjectMilestones::getRangeMilestones($dtv, $dtv);
if ($task_filter != "hide") {
$tasks = ProjectTasks::getRangeTasksByUser($dtv, $dtv, $user_filter != -1 ? $user : null, $task_filter);
}
if (user_config_option('show_birthdays_in_calendar')) {
$birthdays = Contacts::instance()->getRangeContactsByBirthday($dtv, $dtv, active_context_members(false));
} else {
$birthdays = array();
}
foreach ($result as $key => $event) {
if ($event->getTypeId() > 1) {
$alldayevents[] = $event;
unset($result[$key]);
}
}
if ($milestones) {
$alldayevents = array_merge($alldayevents, $milestones);
}
示例2: stylesheet_tag
}
echo stylesheet_tag('event/day.css');
$today = DateTimeValueLib::now();
$today->add('h', logged_user()->getTimezone());
$currentday = $today->format("j");
$currentmonth = $today->format("n");
$currentyear = $today->format("Y");
$drawHourLine = $day == $currentday && $month == $currentmonth && $year == $currentyear;
$dtv = DateTimeValueLib::make(0, 0, 0, $month, $day, $year);
$result = ProjectEvents::getDayProjectEvents($dtv, $tags, active_project(), $user_filter, $status_filter);
if (!$result) {
$result = array();
}
$alldayevents = array();
$milestones = ProjectMilestones::getRangeMilestonesByUser($dtv, $dtv, $user_filter != -1 ? $user : null, $tags, active_project());
$tasks = ProjectTasks::getRangeTasksByUser($dtv, $dtv, $user_filter != -1 ? $user : null, $tags, active_project());
$birthdays = Contacts::instance()->getRangeContactsByBirthday($dtv, $dtv);
foreach ($result as $key => $event) {
if ($event->getTypeId() > 1) {
$alldayevents[] = $event;
unset($result[$key]);
}
}
if ($milestones) {
$alldayevents = array_merge($alldayevents, $milestones);
}
if ($tasks) {
$tmp_tasks = array();
$dtv_end = new DateTimeValue($dtv->getTimestamp() + 60 * 60 * 24);
foreach ($tasks as $task) {
$tmp_tasks = array_merge($tmp_tasks, replicateRepetitiveTaskForCalendar($task, $dtv, $dtv_end));
示例3: logged_user
// end of week
$today = DateTimeValueLib::now();
$today->add('h', logged_user()->getTimezone());
$currentday = $today->format("j");
$currentmonth = $today->format("n");
$currentyear = $today->format("Y");
$drawHourLine = false;
$lastday = date("t", mktime(0, 0, 0, $month, 1, $year));
// # of days in the month
$date_start = new DateTimeValue(mktime(0, 0, 0, $month, $startday, $year));
$date_end = new DateTimeValue(mktime(0, 0, 0, $month, $endday, $year));
// $date_start->add('h', logged_user()->getTimezone());
// $date_end->add('h', logged_user()->getTimezone());
$milestones = ProjectMilestones::getRangeMilestones($date_start, $date_end);
if ($task_filter != "hide") {
$tasks = ProjectTasks::getRangeTasksByUser($date_start, $date_end, $user_filter != -1 ? $user : null, $task_filter);
}
// FIXME
$birthdays = array();
//Contacts::instance()->getRangeContactsByBirthday($date_start, $date_end);
$tmp_tasks = array();
foreach ($tasks as $task) {
$tmp_tasks = array_merge($tmp_tasks, replicateRepetitiveTaskForCalendar($task, $date_start, $date_end));
}
$dates = array();
//datetimevalue for each day of week
$results = array();
$allday_events_count = array();
$alldayevents = array();
$today_style = array();
$task_starts = array();
示例4: user_config_option
// beginning of the week, sunday
}
user_config_option('show_two_weeks_calendar', null, logged_user()->getId()) ? $my_weeks = 2 : ($my_weeks = 1);
$endday = $startday + 7 * $my_weeks;
$today = DateTimeValueLib::now()->add('h', logged_user()->getTimezone());
$currentday = $today->getDay();
$currentmonth = $today->getMonth();
$currentyear = $today->getYear();
$user_comp_filter = user_config_option('pending tasks widget assigned to filter');
$exploded = explode(":", $user_comp_filter);
$user_filter_id = array_var($exploded, 1);
$user_filter = $user_filter_id > 0 ? Users::findById($user_filter_id) : null;
$date_start = new DateTimeValue(mktime(0, 0, 0, $currentmonth, $startday, $currentyear));
$date_end = new DateTimeValue(mktime(0, 0, 0, $currentmonth, $endday, $currentyear));
//FIXME $milestones = ProjectMilestones::getRangeMilestones($date_start, $date_end);
$tmp_tasks = ProjectTasks::getRangeTasksByUser($date_start, $date_end, $user_filter);
//FIXME
$birthdays = array();
//Contacts::instance()->getRangeContactsByBirthday($date_start, $date_end);
$tasks = array();
if ($tmp_tasks) {
foreach ($tmp_tasks as $task) {
$tasks = array_merge($tasks, replicateRepetitiveTaskForCalendar($task, $date_start, $date_end));
}
}
$use_24_hours = user_config_option('time_format_use_24');
if ($use_24_hours) {
$timeformat = 'G:i';
} else {
$timeformat = 'g:i A';
}
示例5: DateTimeValue
<th width="14%"></th>
<th width="15%"></th>
<?php
if (user_config_option("start_monday")) {
?>
<th width='15%'></th>
<?php
}
?>
<th id="ie_scrollbar_adjust" style="display:none;width:15px;padding:0px;margin:0px;"></th>
</tr>
<?php
$date_start = new DateTimeValue(mktime(0, 0, 0, $month - 1, $firstday, $year));
$date_end = new DateTimeValue(mktime(0, 0, 0, $month + 1, $lastday, $year));
$milestones = ProjectMilestones::getRangeMilestonesByUser($date_start, $date_end, $user_filter != -1 ? $user : null, $tags, active_project());
$tasks = ProjectTasks::getRangeTasksByUser($date_start, $date_end, $user_filter != -1 ? $user : null, $tags, active_project());
$birthdays = Contacts::instance()->getRangeContactsByBirthday($date_start, $date_end);
$result = array();
if ($milestones) {
$result = array_merge($result, $milestones);
}
if ($tasks) {
foreach ($tasks as $task) {
$result = array_merge($result, replicateRepetitiveTaskForCalendar($task, $date_start, $date_end));
}
}
if ($birthdays) {
$result = array_merge($result, $birthdays);
}
// Loop to render the calendar
for ($week_index = 0;; $week_index++) {
示例6: user_config_option
// beginning of the week, sunday
}
user_config_option('show_two_weeks_calendar', null, logged_user()->getId()) ? $my_weeks = 2 : ($my_weeks = 1);
$endday = $startday + 7 * $my_weeks;
$today = DateTimeValueLib::now()->add('h', logged_user()->getTimezone());
$currentday = $today->getDay();
$currentmonth = $today->getMonth();
$currentyear = $today->getYear();
$user_comp_filter = user_config_option('pending tasks widget assigned to filter');
$exploded = explode(":", $user_comp_filter);
$user_filter_id = array_var($exploded, 1);
$user_filter = $user_filter_id > 0 ? Users::findById($user_filter_id) : null;
$date_start = new DateTimeValue(mktime(0, 0, 0, $currentmonth, $startday, $currentyear));
$date_end = new DateTimeValue(mktime(0, 0, 0, $currentmonth, $endday, $currentyear));
$milestones = ProjectMilestones::getRangeMilestonesByUser($date_start, $date_end, $user_filter, $tags, active_project());
$tmp_tasks = ProjectTasks::getRangeTasksByUser($date_start, $date_end, $user_filter, $tags, active_project());
$birthdays = Contacts::instance()->getRangeContactsByBirthday($date_start, $date_end);
$tasks = array();
if ($tmp_tasks) {
foreach ($tmp_tasks as $task) {
$tasks = array_merge($tasks, replicateRepetitiveTaskForCalendar($task, $date_start, $date_end));
}
}
$use_24_hours = user_config_option('time_format_use_24');
if ($use_24_hours) {
$timeformat = 'G:i';
} else {
$timeformat = 'g:i A';
}
// load the day we are currently viewing in the calendar
$output = '';