WorkListMapper
extends ApiMapper
in package
FinalYes
`WorkList` is a job (historical name); `WorkSheet` is a work sheet inside a job.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- archive() : Result
- delete() : Result
- deleteAll() : Result
- find() : T|null
- findAll() : T>, 1: int}
- findBy() : T|null
- invoicePreview() : Result
- invoiceSheets() : Result
- Thin pass-through to the repository; the `Result` is already built there (no entity to hydrate).
- save() : Result
- unarchive() : Result
- updateColumns() : Result
- 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
archive()
public
archive(int $id) : Result
Parameters
- $id : int
Return values
Resultdelete()
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|nullinvoicePreview()
public
invoicePreview(int $id, array<int, int> $sheetIds) : Result
Parameters
- $id : int
- $sheetIds : array<int, int>
Return values
ResultinvoiceSheets()
Thin pass-through to the repository; the `Result` is already built there (no entity to hydrate).
public
invoiceSheets(int $id, array<int, int> $sheetIds, bool $createFollowUpSheet, string|null $followUpName) : Result
Parameters
- $id : int
- $sheetIds : array<int, int>
- $createFollowUpSheet : bool
- $followUpName : string|null
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
Resultunarchive()
public
unarchive(int $id, string|null $reason) : Result
Parameters
- $id : int
- $reason : string|null
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) : WorkList|null
Parameters
- $row : array<string, mixed>