TimeSlotMapper
extends ApiMapper
in package
FinalYes
Admin mapper that hydrates Api repository data into entities.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- availability() : array<int|string, mixed>
- Thin pass-through to the repository returning plain data (no entity to hydrate), see {@see TimeSlotRepository::availability()}.
- availabilityForCalendar() : array<int|string, mixed>
- Thin pass-through to the repository, see {@see TimeSlotRepository::availabilityForCalendar()}.
- dayDetail() : array<int|string, mixed>
- Thin pass-through to the repository, see {@see TimeSlotRepository::dayDetail()}.
- delete() : Result
- deleteAll() : Result
- find() : T|null
- findAll() : T>, 1: int}
- findBy() : T|null
- openWindow() : Result
- Thin pass-through to the repository, see {@see shorten()}.
- save() : Result
- shorten() : Result
- Thin pass-through to the repository; the `Result` is already built there (no entity to hydrate).
- split() : Result
- Thin pass-through to the repository, see {@see shorten()}.
- updateColumns() : Result
- getEntityClass() : T>
- initalizeEntity() : TimeSlot|null
Properties
$hydrator read-only
protected
EntityHydrator
$hydrator
$repository read-only
protected
TimeSlotRepository
$repository
Methods
__construct()
public
__construct(TimeSlotRepository $repository, EntityHydrator $hydrator) : mixed
Parameters
- $repository : TimeSlotRepository
- $hydrator : EntityHydrator
availability()
Thin pass-through to the repository returning plain data (no entity to hydrate), see {@see TimeSlotRepository::availability()}.
public
availability(int $companyId, string $month) : array<int|string, mixed>
Parameters
- $companyId : int
- $month : string
Return values
array<int|string, mixed>availabilityForCalendar()
Thin pass-through to the repository, see {@see TimeSlotRepository::availabilityForCalendar()}.
public
availabilityForCalendar(int $calendarId, string $month) : array<int|string, mixed>
Parameters
- $calendarId : int
- $month : string
Return values
array<int|string, mixed>dayDetail()
Thin pass-through to the repository, see {@see TimeSlotRepository::dayDetail()}.
public
dayDetail(int $calendarId, string $date) : array<int|string, mixed>
Parameters
- $calendarId : int
- $date : string
Return values
array<int|string, mixed>delete()
public
delete(int|array<string|int, mixed> $id) : Result
Parameters
- $id : int|array<string|int, mixed>
Return values
ResultdeleteAll()
public
deleteAll([array<string|int, mixed> $filters = [] ]) : Result
Parameters
- $filters : array<string|int, mixed> = []
Return values
Resultfind()
public
find(int $pageId[, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
- $pageId : int
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T|nullfindAll()
public
findAll([array<string|int, mixed>|null $filters = [] ][, array<string|int, mixed>|null $orderBys = null ][, int|null $offset = null ][, int|null $limit = null ][, array<string|int, mixed>|null $columns = null ][, bool $computeTotalCount = false ][, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T>, 1: int}
Parameters
- $filters : array<string|int, mixed>|null = []
- $orderBys : array<string|int, mixed>|null = null
- $offset : int|null = null
- $limit : int|null = null
- $columns : array<string|int, mixed>|null = null
- $computeTotalCount : bool = false
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T>, 1: int}findBy()
public
findBy([array<string|int, mixed>|null $filters = [] ][, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
- $filters : array<string|int, mixed>|null = []
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T|nullopenWindow()
Thin pass-through to the repository, see {@see shorten()}.
public
openWindow(int $calendarId, string $date, string $timeFrom, string $timeTo) : Result
Parameters
- $calendarId : int
- $date : string
- $timeFrom : string
- $timeTo : string
Return values
Resultsave()
public
save(BaseEntity $entity[, array<string, mixed> $meta = [] ][, array<int, string> $skipFields = [] ]) : Result
Parameters
- $entity : BaseEntity
- $meta : array<string, mixed> = []
- $skipFields : array<int, string> = []
Return values
Resultshorten()
Thin pass-through to the repository; the `Result` is already built there (no entity to hydrate).
public
shorten(int $timeSlotId, string $timeFrom, string $timeTo, bool $notifyClient) : Result
Parameters
- $timeSlotId : int
- $timeFrom : string
- $timeTo : string
- $notifyClient : bool
Return values
Resultsplit()
Thin pass-through to the repository, see {@see shorten()}.
public
split(int $timeSlotId, string $cutTime, bool $notifyClient) : Result
Parameters
- $timeSlotId : int
- $cutTime : string
- $notifyClient : bool
Return values
ResultupdateColumns()
public
updateColumns(array<string|int, mixed> $ids, array<string, mixed> $values) : Result
Parameters
- $ids : array<string|int, mixed>
-
ids or composite-id arrays
- $values : array<string, mixed>
-
property name => new value
Return values
ResultgetEntityClass()
protected
getEntityClass() : T>
Return values
T>initalizeEntity()
protected
initalizeEntity(array<string, mixed> $row) : TimeSlot|null
Parameters
- $row : array<string, mixed>