TypeService implements Errorable
Table of Contents
Interfaces
- Errorable
Constants
- ERROR_COULD_NOT_ADD_PARTICIPANTS = 'TASKS_ITEM_TYPE_06'
- ERROR_COULD_NOT_CHANGE = 'TASKS_ITEM_TYPE_03'
- ERROR_COULD_NOT_CREATE = 'TASKS_ITEM_TYPE_02'
- ERROR_COULD_NOT_IS_EMPTY = 'TASKS_ITEM_TYPE_01'
- ERROR_COULD_NOT_READ = 'TASKS_ITEM_TYPE_05'
- ERROR_COULD_NOT_REMOVE = 'TASKS_ITEM_TYPE_04'
Methods
- __construct() : mixed
- changeType() : bool
- Changes the type.
- createType() : TypeForm
- Creates a type.
- getErrorByCode() : mixed
- getErrors() : mixed
- getType() : TypeForm
- getTypes() : array<string|int, TypeForm>
- Returns types based on entity id.
- isEmpty() : bool
- Checks if types have already been created for the entity.
- removeType() : bool
- Removes the type.
- saveParticipants() : bool
- Saves the type participants.
Constants
ERROR_COULD_NOT_ADD_PARTICIPANTS
public
mixed
ERROR_COULD_NOT_ADD_PARTICIPANTS
= 'TASKS_ITEM_TYPE_06'
ERROR_COULD_NOT_CHANGE
public
mixed
ERROR_COULD_NOT_CHANGE
= 'TASKS_ITEM_TYPE_03'
ERROR_COULD_NOT_CREATE
public
mixed
ERROR_COULD_NOT_CREATE
= 'TASKS_ITEM_TYPE_02'
ERROR_COULD_NOT_IS_EMPTY
public
mixed
ERROR_COULD_NOT_IS_EMPTY
= 'TASKS_ITEM_TYPE_01'
ERROR_COULD_NOT_READ
public
mixed
ERROR_COULD_NOT_READ
= 'TASKS_ITEM_TYPE_05'
ERROR_COULD_NOT_REMOVE
public
mixed
ERROR_COULD_NOT_REMOVE
= 'TASKS_ITEM_TYPE_04'
Methods
__construct()
public
__construct() : mixed
changeType()
Changes the type.
public
changeType(TypeForm $typeForm) : bool
Parameters
- $typeForm : TypeForm
-
The type form object.
Return values
boolcreateType()
Creates a type.
public
createType(TypeForm $typeForm) : TypeForm
Parameters
- $typeForm : TypeForm
-
The type form object.
Return values
TypeFormgetErrorByCode()
public
getErrorByCode(mixed $code) : mixed
Parameters
- $code : mixed
getErrors()
public
getErrors() : mixed
getType()
public
getType(int $typeId) : TypeForm
Parameters
- $typeId : int
Return values
TypeFormgetTypes()
Returns types based on entity id.
public
getTypes(int $entityId) : array<string|int, TypeForm>
Parameters
- $entityId : int
-
The types entity id.
Return values
array<string|int, TypeForm>isEmpty()
Checks if types have already been created for the entity.
public
isEmpty(int $entityId) : bool
Parameters
- $entityId : int
-
Entity id.
Return values
boolremoveType()
Removes the type.
public
removeType(TypeForm $typeForm) : bool
Parameters
- $typeForm : TypeForm
-
The type form object.
Return values
boolsaveParticipants()
Saves the type participants.
public
saveParticipants(TypeForm $typeForm) : bool
Parameters
- $typeForm : TypeForm
-
The type form object.