Plentymarkets interface documentation
Board
Contracts
BoardColumnRepositoryContract
The BoardColumnRepositoryContract is the interface for the board column repository. This interface provides methods to access, create, update or delete columns.
Namespace
Plenty\Modules\Board\Contracts
Methods
public list($boardId):Illuminate\Support\Collection
Return type: Collection
Lists all columns assigned to a specific board.
Name |
Type |
Description |
|
The ID of the board to get columns for |
public create($boardId, $data):Plenty\Modules\Board\Models\BoardColumn
Return type: BoardColumn
Creates a new column and assigns it to a specific board.
Name |
Type |
Description |
|
The ID of the board to assign the new column to |
|
|
The data of the new column |
public update($boardId, $columnId, $data):Plenty\Modules\Board\Models\BoardColumn
Return type: BoardColumn
Updates a specific column.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column to be updated |
|
|
The data to assign to the specified column |
public copy($boardId, $columnId):Plenty\Modules\Board\Models\BoardColumn
Return type: BoardColumn
Copies a column and all its tasks.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column to be copied |
public updatePosition($boardId, $columnId, $newPosition):bool
Updates the position of a specified column. This will update the position of all affected columns on the same board too.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column to update the position for |
|
|
The new position |
public delete($boardId, $columnId):bool
Deletes a specific column.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column to be deleted |
BoardRepositoryContract
The BoardRepositoryContract is the interface for the board repository. This interface provides all methods to access, create, update or delete boards.
Namespace
Plenty\Modules\Board\Contracts
Methods
public list($columns = []):Illuminate\Database\Eloquent\Collection
Return type: Collection
Lists all boards.
Name |
Type |
Description |
|
Fields to load for each board |
public get($boardId, $tasksPerPage = 20):Plenty\Modules\Board\Models\Board
Return type: Board
Returns a single board.
Name |
Type |
Description |
|
The ID of the board to get |
|
|
The maximum number of tasks to load for each column |
public create($data):Plenty\Modules\Board\Models\Board
Return type: Board
Creates a new board.
Name |
Type |
Description |
|
The data of the new board |
public update($boardId, $data):Plenty\Modules\Board\Models\Board
Return type: Board
Updates a board.
Name |
Type |
Description |
|
The ID of the board to be updated |
|
|
New data to be assigned to the board if it exists |
public copy($boardId):Plenty\Modules\Board\Models\Board
Return type: Board
Copies a board and all its columns.
Name |
Type |
Description |
|
The ID of the board to be copied |
public updateTasksCount($boardId):bool
Updates the tasks count value.
Name |
Type |
Description |
|
The ID of the board to update the tasks count |
public delete($boardId):bool
Deletes a board. Returns true
if the deletion was successful.
Name |
Type |
Description |
|
The ID of the board to be deleted |
BoardTaskReferenceRepositoryContract
The BoardTaskReferenceRepositoryContract is the interface for the board task reference repository. This interface provides methods to create or delete references from tasks to contacts or tickets.
Namespace
Plenty\Modules\Board\Contracts
Methods
public create($taskId, $referenceValue):Plenty\Modules\Board\Models\BoardTaskReference
Return type: BoardTaskReference
Creates a new reference to a given task. A reference may either point to a contact or to a ticket.
Name |
Type |
Description |
|
The ID of the task to create a reference for |
|
|
Reference type followed by foreign ID of the referenced object. Syntax: TYPE-ID Example: user-123456 Types: user,ticket,contact,order,item |
public delete($referenceId):bool
Deletes a specific reference.
Name |
Type |
Description |
|
The ID of the reference |
public checkReferenceKey($referenceType, $referenceKey):bool
Checks whether the reference key for the given reference type exists or not.
Name |
Type |
Description |
|
The reference type (one of 'contact', 'order', 'item', 'ticket' or 'user') |
|
|
The ID of the corresponding reference type |
BoardTaskRepositoryContract
The BoardTaskRepositoryContract is the interface for the board task repository. This interface provides methods to access, create, update or delete tasks.
Namespace
Plenty\Modules\Board\Contracts
Methods
public list($columnId, $startAt, $tasksPerPage = 20, $columns = []):Illuminate\Database\Eloquent\Collection
Return type: Collection
Lists tasks for a specific column. Will return at most 20 tasks starting at defined task.
Name |
Type |
Description |
|
The ID of the column to get tasks for |
|
|
The position of a task to start listing at |
|
|
The number of tasks to get per page |
|
|
Fields to load for each task |
public create($boardId, $columnId, $data):Plenty\Modules\Board\Models\BoardTask
Return type: BoardTask
Creates a new task and assigns it to a specified column.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column to assign the created task to |
|
|
The data of the new task |
public copy($boardId, $columnId, $taskId):Plenty\Modules\Board\Models\BoardTask
Return type: BoardTask
Copies the task with all references.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column to assign the copied task to |
|
|
The ID of the task to be copied |
public get($taskId):Plenty\Modules\Board\Models\BoardTask
Return type: BoardTask
Returns a task for a given ID.
Name |
Type |
Description |
|
The ID of the task |
public update($boardId, $columnId, $taskId, $data):Plenty\Modules\Board\Models\BoardTask
Return type: BoardTask
Updates a specified task.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column the task belongs to |
|
|
The ID of the task to be updated |
|
|
Data to set at the task |
public addReference($boardTaskReference):bool
Adds a task reference to a task object.
Name |
Type |
Description |
|
The board task reference |
public removeReference($boardTaskReference):bool
Removes a task reference from a task object.
Name |
Type |
Description |
|
The board task reference |
public updatePosition($taskId, $newColumnId, $newPosition):int
Updates the position of a specified task. Will also update the position of all following tasks in the same column.
Name |
Type |
Description |
|
The ID of the task to update the position for |
|
|
The ID of the column the task now belongs to |
|
|
The new position |
public delete($taskId):bool
Deletes a specified task.
Name |
Type |
Description |
|
The ID of the task to be deleted |
public deleteByColumn($boardId, $columnId):bool
Deletes all tasks of a column.
Name |
Type |
Description |
|
The ID of the board the column belongs to |
|
|
The ID of the column the task belongs to |
public allByColumnId($columnId, $referenceValue = null, $columns = []):void
Gets all tasks for the given column ID having a reference with the given reference value.
Name |
Type |
Description |
|
The ID of the column |
|
|
The reference value that has to be contained in the task. Can be NULL. |
|
|
The attributes of the task to load |
public allByBoardId($boardId, $referenceValue = null, $columns = []):void
Gets all tasks for the given column ID having a reference with the given reference value.
Name |
Type |
Description |
|
The ID of the board |
|
|
The reference value that has to be contained in the task. Can be NULL. |
|
|
The attributes of the task to load |
Events
AfterBoardColumnTasksDeleted
This event will be triggered, after all tasks of a column were deleted.
Namespace
Plenty\Modules\Board\Events
Methods
public getBoardId():string
public getColumnId():string
public getDeletedTaskIdList():array
AfterBoardTaskCreated
This event will be triggered, when a board task was created.
Namespace
Plenty\Modules\Board\Events
AfterBoardTaskDeleted
This event will be triggered, when a single board task was deleted. It won't be triggered, if a board column was deleted.
Namespace
Plenty\Modules\Board\Events
AfterBoardTaskReferenceCreated
This event will be triggered, after a task reference was created.
Namespace
Plenty\Modules\Board\Events
Methods
public getBoardTaskReference():Plenty\Modules\Board\Models\BoardTaskReference
Return type: BoardTaskReference
AfterBoardTaskReferenceDeleted
This event will be triggered, after a task reference was deleted.
Namespace
Plenty\Modules\Board\Events
Methods
public getBoardTaskReference():Plenty\Modules\Board\Models\BoardTaskReference
Return type: BoardTaskReference
BeforeBoardColumnDeleted
This event will be triggered, before a board column will be deleted.
Namespace
Plenty\Modules\Board\Events
Methods
public getBoard():Plenty\Modules\Board\Models\Board
Return type: Board
public getColumnId():string
BeforeBoardDeleted
This event will be triggered, before a board will be deleted.
Namespace
Plenty\Modules\Board\Events
Models
Board
The board model.
Namespace
Plenty\Modules\Board\Models
Name | Type | Description |
---|---|---|
id |
The ID of the board |
|
boardName |
The name of the board |
|
boardColumns |
The columns of the board |
|
columnsCount |
The number of columns |
|
tasksCount |
The number of tasks |
Methods
public toArray()
Returns this model as an array.
BoardColumn
The board column model.
Namespace
Plenty\Modules\Board\Models
Name | Type | Description |
---|---|---|
id |
The ID of the board column |
|
boardId |
The ID of the board |
|
columnName |
The name of the column |
|
position |
The position |
|
tasks |
The tasks |
Methods
public toArray()
Returns this model as an array.
BoardTask
The board task model.
Namespace
Plenty\Modules\Board\Models
Name | Type | Description |
---|---|---|
id |
The ID of the board task |
|
taskName |
The name of the task |
|
description |
The description of the task |
|
position |
The position of the task |
|
columnId |
The ID of the column |
|
boardId |
The ID of the board |
|
tags |
||
references |
Methods
public toArray()
Returns this model as an array.
BoardTaskReference
The task reference model.
Namespace
Plenty\Modules\Board\Models
Name | Type | Description |
---|---|---|
id |
The ID of the board task reference |
|
taskId |
The ID of the task to create a reference for |
|
referenceValue |
Reference type followed by foreign ID of the referenced object. Syntax: TYPE-ID Example: user-123456 Types: user,ticket,contact,order,item |
Methods
public toArray()
Returns this model as an array.