Example #1
0
 public function GetList($pageNumber, $pageSize, $sortField = null, $sortDirection = null, $filter = null)
 {
     $command = new GetAllResourcesCommand();
     if ($filter != null) {
         $command = new FilterCommand($command, $filter);
     }
     $builder = array('BookableResource', 'Create');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }
 /**
  * @param $pageNumber int
  * @param $pageSize int
  * @param $filter ReservationFilter
  * @param $userSession UserSession
  * @return PageableData|ReservationItemView[]
  */
 public function LoadFiltered($pageNumber, $pageSize, $filter, $userSession)
 {
     $user = $this->userRepository->LoadById($userSession->UserId);
     $adminGroups = $user->GetAdminGroups();
     $groupIds = array();
     foreach ($adminGroups as $group) {
         $groupIds[] = $group->GroupId;
     }
     $command = new GetFullGroupReservationListCommand($groupIds);
     if ($filter != null) {
         $command = new FilterCommand($command, $filter->GetFilter());
     }
     $builder = array('ReservationItemView', 'Populate');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }
 public function GetBlackoutList($pageNumber, $pageSize, $sortField = null, $sortDirection = null, $filter = null)
 {
     $command = new GetBlackoutListFullCommand();
     if ($filter != null) {
         $command = new FilterCommand($command, $filter);
     }
     $builder = array('BlackoutItemView', 'Populate');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }
Example #4
0
 public function GetList($pageNumber, $pageSize, $sortField = null, $sortDirection = null, $filter = null, $accountStatus = AccountStatus::ALL)
 {
     $command = new GetAllUsersByStatusCommand($accountStatus);
     if ($filter != null) {
         $command = new FilterCommand($command, $filter);
     }
     $builder = array('UserItemView', 'Create');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }
 public function GetGroupsWithPermission($resourceId, $pageNumber = null, $pageSize = null, $filter = null)
 {
     $command = new GetResourceGroupPermissionCommand($resourceId);
     if ($filter != null) {
         $command = new FilterCommand($command, $filter);
     }
     $builder = array('GroupItemView', 'Create');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }
Example #6
0
 /**
  * @param int $pageNumber
  * @param int $pageSize
  * @param string|null $sortField
  * @param string|null $sortDirection
  * @param ISqlFilter $filter
  * @return PageableData|Schedule[]
  */
 public function GetList($pageNumber, $pageSize, $sortField = null, $sortDirection = null, $filter = null)
 {
     $command = new GetAllSchedulesCommand();
     if ($filter != null) {
         $command = new FilterCommand($command, $filter);
     }
     $builder = array('Schedule', 'FromRow');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }
Example #7
0
 /**
  * @param array|int|int[] $groupIds
  * @param null $pageNumber
  * @param null $pageSize
  * @param null $filter
  * @param AccountStatus|int $accountStatus
  * @return PageableData|UserItemView[]
  */
 public function GetUsersInGroup($groupIds, $pageNumber = null, $pageSize = null, $filter = null, $accountStatus = AccountStatus::ACTIVE)
 {
     $command = new GetAllGroupUsersCommand($groupIds, $accountStatus);
     if ($filter != null) {
         $command = new FilterCommand($command, $filter);
     }
     $builder = array('UserItemView', 'Create');
     return PageableDataStore::GetList($command, $builder, $pageNumber, $pageSize);
 }