public function PageLoad() { $this->Set('DefaultTitle', Resources::GetInstance()->GetString('NoTitleLabel')); $this->presenter->SetSearchCriteria(ServiceLocator::GetServer()->GetUserSession()->UserId, ReservationUserLevel::ALL); $this->presenter->PageLoad(); $this->Display('upcoming_reservations.tpl'); }
public function PageLoad() { // $this->attrControl->PageLoad(); $this->Set('DefaultTitle', Resources::GetInstance()->GetString('NoTitleLabel')); $this->presenter->SetSearchCriteria(ReservationViewRepository::ALL_USERS, ReservationUserLevel::ALL); $this->presenter->PageLoad(); $this->Display('upcoming_reservations.tpl'); }
public function testGetsUpToTwoWeeksWorthOfReservationsThatCurrentUserScheduled() { $now = Date::Parse('2011-03-24', 'UTC'); // thursday Date::_SetNow($now); $startDate = $now; $endDate = Date::Parse('2011-04-02', 'UTC'); $userId = $this->fakeUser->UserId; $timezone = $this->fakeUser->Timezone; $reservations = array(); $this->repository->expects($this->once())->method('GetReservationList')->with($this->equalTo($startDate), $this->equalTo($endDate), $this->equalTo($userId), $this->equalTo(ReservationUserLevel::ALL))->will($this->returnValue($reservations)); $this->control->expects($this->once())->method('SetTimezone')->with($this->equalTo($timezone)); $this->control->expects($this->once())->method('BindToday')->with($this->anything()); $this->control->expects($this->once())->method('BindTomorrow')->with($this->anything()); $this->control->expects($this->once())->method('BindThisWeek')->with($this->anything()); $this->control->expects($this->once())->method('BindNextWeek')->with($this->anything()); $presenter = new UpcomingReservationsPresenter($this->control, $this->repository); $presenter->SetSearchCriteria($userId, ReservationUserLevel::ALL); $presenter->PageLoad(); }