當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ProjectMilestones::getRangeMilestones方法代碼示例

本文整理匯總了PHP中ProjectMilestones::getRangeMilestones方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProjectMilestones::getRangeMilestones方法的具體用法?PHP ProjectMilestones::getRangeMilestones怎麽用?PHP ProjectMilestones::getRangeMilestones使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ProjectMilestones的用法示例。


在下文中一共展示了ProjectMilestones::getRangeMilestones方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: logged_user

// beginning of the week, monday
$endday = $startday + 7;
// 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();
開發者ID:rorteg,項目名稱:fengoffice,代碼行數:31,代碼來源:viewweek5days.php

示例2: stylesheet_tag

echo stylesheet_tag('event/day.css');
//today in gmt 0
$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) {
開發者ID:abhinay100,項目名稱:fengoffice_app,代碼行數:31,代碼來源:viewdate.php

示例3: 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, active_context(), $user_filter, $status_filter); 
	if(!$result) $result = array();	
	
	$alldayevents = array();
	$milestones = ProjectMilestones::getRangeMilestones($today, $today);
        if($task_filter != "hide"){
            $tasks = ProjectTasks::getRangeTasksByUser($dtv, $dtv, ($user_filter != -1 ? $user : null), $task_filter);
        }
        // FIXME
	$birthdays = array(); //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);
開發者ID:Jtgadbois,項目名稱:Pedadida,代碼行數:31,代碼來源:viewdate.php


注:本文中的ProjectMilestones::getRangeMilestones方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。