WorkListMapper
extends ApiMapper
in package
FinalYes
Front mapper that hydrates Api repository data into entities.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- find() : T|null
- findAll() : T>, 1: int}
- findBy() : T|null
-
findMyLists()
: WorkList>, totalCount: int, workItemCounts: array
} - Returns the jobs of the logged-in customer.
- getEntityClass() : T>
- initalizeEntity() : WorkList|null
Properties
$hydrator read-only
protected
EntityHydrator
$hydrator
$repository read-only
protected
WorkListRepository
$repository
Methods
__construct()
public
__construct(WorkListRepository $repository, EntityHydrator $hydrator) : mixed
Parameters
- $repository : WorkListRepository
- $hydrator : EntityHydrator
find()
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|nullfindMyLists()
Returns the jobs of the logged-in customer.
public
findMyLists([int|null $offset = null ][, int|null $limit = null ][, bool $computeTotalCount = true ]) : WorkList>, totalCount: int, workItemCounts: array}
Bridge to the narrow Api action myList
(WorkListPresenter::internalActionMyList()).
The response has an extra workItemCounts key besides the standard items / totalCount / _references, so the base ApiMapper::findAll() is not used; hydrateAll() is called by hand, as in ServiceMapper::findPublicList().
Parameters
- $offset : int|null = null
- $limit : int|null = null
- $computeTotalCount : bool = true
Return values
WorkList>, totalCount: int, workItemCounts: arraygetEntityClass()
protected
getEntityClass() : T>
Return values
T>initalizeEntity()
protected
initalizeEntity(array<string, mixed> $row) : WorkList|null
Parameters
- $row : array<string, mixed>