WorkItemService
extends ApiService
in package
implements
ServiceInterface
Front service that reads entities through the mapper.
Tags
Table of Contents
Interfaces
- ServiceInterface
- Contract of the front service layer.
Properties
Methods
- __construct() : mixed
- addMyComment() : array{success: bool, code: int|null, message: string|null, commentId: int|null, approved: bool, retryAfter?: int}
- find() : T|null
- Finds one entity by id.
- findAll() : T>, 1: int}
- Finds all entities matching the criteria.
- findBy() : T|null
- Finds one entity by filters.
- findMyComments() : WorkItemComment>, totalCount: int}
- findMyDetail() : WorkItem|null
-
findMyItems()
: WorkSheet>, unreadComments: array
} - getTotalCount() : int|null
Properties
$mapper read-only
protected
WorkItemMapper
$mapper
Methods
__construct()
public
__construct(WorkItemMapper $mapper) : mixed
Parameters
- $mapper : WorkItemMapper
addMyComment()
public
addMyComment(int $workItemId, string $text) : array{success: bool, code: int|null, message: string|null, commentId: int|null, approved: bool, retryAfter?: int}
Parameters
- $workItemId : int
- $text : string
Return values
array{success: bool, code: int|null, message: string|null, commentId: int|null, approved: bool, retryAfter?: int}find()
Finds one entity by id.
public
find(int $id[, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
- $id : int
- $includes : string|array<string|int, mixed> = []
- $useCache : bool|null = null
Return values
T|nullfindAll()
Finds all entities matching the criteria.
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()
Finds one entity by filters.
public
findBy([array<string|int, mixed>|null $filters = [] ][, string|array<string|int, mixed>|null $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
- $filters : array<string|int, mixed>|null = []
- $includes : string|array<string|int, mixed>|null = []
- $useCache : bool|null = null
Return values
T|nullfindMyComments()
public
findMyComments(int $workItemId[, int|null $offset = null ][, int|null $limit = null ]) : WorkItemComment>, totalCount: int}
Parameters
- $workItemId : int
- $offset : int|null = null
- $limit : int|null = null
Return values
WorkItemComment>, totalCount: int}findMyDetail()
public
findMyDetail(int $workItemId) : WorkItem|null
Parameters
- $workItemId : int
Return values
WorkItem|nullfindMyItems()
public
findMyItems(int $workListId[, int|null $offset = null ][, int|null $limit = null ]) : WorkSheet>, unreadComments: array}
Parameters
- $workListId : int
- $offset : int|null = null
- $limit : int|null = null
Return values
WorkSheet>, unreadComments: arraygetTotalCount()
public
getTotalCount() : int|null