public function GetLayout(UserSession $user) { $scheduleId = $this->_page->GetScheduleId(); $layoutDate = $this->_page->GetLayoutDate(); $requestedDate = Date::Parse($layoutDate, $user->Timezone); $layout = $this->_scheduleService->GetLayout($scheduleId, new ScheduleLayoutFactory($user->Timezone)); $periods = $layout->GetLayout($requestedDate); // Log::Debug('Getting layout for scheduleId=%s, layoutDate=%s, periods=%s', $scheduleId, $layoutDate,var_export($periods, true)); $this->_page->SetLayoutResponse(new ScheduleLayoutSerializable($periods)); }
public function BindResourceFilter(ISchedulePage $page, ScheduleResourceFilter $filter, $resourceCustomAttributes, $resourceTypeCustomAttributes) { if ($filter->ResourceAttributes != null) { foreach ($filter->ResourceAttributes as $attributeFilter) { $this->SetAttributeValue($attributeFilter, $resourceCustomAttributes); } } if ($filter->ResourceTypeAttributes != null) { foreach ($filter->ResourceTypeAttributes as $attributeFilter) { $this->SetAttributeValue($attributeFilter, $resourceTypeCustomAttributes); } } $page->SetResourceCustomAttributes($resourceCustomAttributes); $page->SetResourceTypeCustomAttributes($resourceTypeCustomAttributes); ServiceLocator::GetServer()->SetCookie(new Cookie('resource_filter' . $filter->ScheduleId, json_encode($filter))); $page->SetFilter($filter); }