Pionia Core

EventsContract

Table of Contents

Methods

getItem()  : null|object
Override this in your service to define the basis to return single item details
getItems()  : null|object
Override this in your service to define the basis to return multiple items from the database
getJoinQuery()  : null|object
Override this in your service to define the basis to return multiple items from the database
postCreate()  : object|array<string|int, mixed>|null
This method is post create action, use it to perform any action after saving.
postDelete()  : mixed
This method is called before the delete action. Use it to perform any action before deleting.
postUpdate()  : object|array<string|int, mixed>|null
This method is post create action, use it to perform any action after saving.
preCreate()  : array<string|int, mixed>|bool|null
This method is called before the create action, use it to transform the data before saving.
preDelete()  : array<string|int, mixed>|null|object|bool
This method is called before the delete action. Use it to perform any action before deleting.
preUpdate()  : array<string|int, mixed>|bool|null
This method is called before the create action, use it to transform the data before saving.

Methods

getItem()

Override this in your service to define the basis to return single item details

public getItem() : null|object
Return values
null|object

getItems()

Override this in your service to define the basis to return multiple items from the database

public getItems() : null|object
Return values
null|object

getJoinQuery()

Override this in your service to define the basis to return multiple items from the database

public getJoinQuery() : null|object
Return values
null|object

postCreate()

This method is post create action, use it to perform any action after saving.

public postCreate([array<string|int, mixed>|object|null $createdItem = null ]) : object|array<string|int, mixed>|null

You have access to the data being created in the $this->request->getData() method

Whatever is returned here is what is returned to the user

Parameters
$createdItem : array<string|int, mixed>|object|null = null
Return values
object|array<string|int, mixed>|null

postDelete()

This method is called before the delete action. Use it to perform any action before deleting.

public postDelete(PDOStatement $deleteInstance[, array<string|int, mixed>|null|object $deletedItem = null ]) : mixed

You have access to the data being updated in the $this->request->getData() method

This has no effect on the delete action. Since it is called after the delete action.

Whatever is returned here is what is returned to the user

Parameters
$deleteInstance : PDOStatement
$deletedItem : array<string|int, mixed>|null|object = null

postUpdate()

This method is post create action, use it to perform any action after saving.

public postUpdate([array<string|int, mixed>|object|null $updatedItem = null ]) : object|array<string|int, mixed>|null

You have access to the data being created in the $this->request->getData() method

Whatever is returned here is what is returned to the user

Parameters
$updatedItem : array<string|int, mixed>|object|null = null
Return values
object|array<string|int, mixed>|null

preCreate()

This method is called before the create action, use it to transform the data before saving.

public preCreate([array<string|int, mixed>|null $createItem = null ]) : array<string|int, mixed>|bool|null

You have access to the data being created in the $this->request->getData() method

Return false, null or throw an exception to stop the create action.

Parameters
$createItem : array<string|int, mixed>|null = null

The data being created - You can modify this data before saving. Return false or null to stop the create action

Return values
array<string|int, mixed>|bool|null

preDelete()

This method is called before the delete action. Use it to perform any action before deleting.

public preDelete([array<string|int, mixed>|null|object $itemToDelete = null ]) : array<string|int, mixed>|null|object|bool

You have access to the data being updated in the $this->request->getData() method

Return false, null or throw an exception to stop the delete action.

Parameters
$itemToDelete : array<string|int, mixed>|null|object = null
Return values
array<string|int, mixed>|null|object|bool

preUpdate()

This method is called before the create action, use it to transform the data before saving.

public preUpdate([array<string|int, mixed>|null $updateItem = null ]) : array<string|int, mixed>|bool|null

You have access to the object being updated $updateItem

Return false, null or raise any exception to stop the update action.

Parameters
$updateItem : array<string|int, mixed>|null = null

The data being updated - You can modify this data before saving

Return values
array<string|int, mixed>|bool|null

The return data is what is saved to the database, if false or null, the update action is aborted


        
On this page

Search results