Behaviour events
Behaviours can catch events triggered on a Nos\Orm\Model or on a instance of Nos\Orm\Model.
Instance events
-
dataset(&$dataset)
Trigger when fill dataset of an item.
Parameters: |
- $dataset (array) – Current dataset of the item.
|
-
form_fieldset_fields(&$config)
Trigger when build a fieldset from an item.
Parameters: |
- $config (array) – Current fieldset configuration.
|
-
form_processing($data, &$json_response)
Trigger when receive a form response.
Parameters: |
- $data (array) – Data received.
- $json_response (array) – JSON response to send.
|
-
wysiwygOptions(&$options)
Trigger when construct WYSIWYG options for an item.
Parameters: |
- $options (array) – Current option for WYSIWYG.
|
Static events
-
gridQueryConfig(&$config)
Trigger when building a query configuration for a grid of model’s items.
Parameters: |
- $config (array) – Configuration for the query.
|
-
gridQuery($config, &$query)
Trigger when building a query for a grid of model’s items.
Parameters: |
- $config (array) – Configuration for the query.
- $query (mixed) – Current query.
|
-
gridItem($object, &$item)
Trigger when building a grid’s item.
Parameters: |
- $object (mixed) – Instance of Model’s item.
- $item (array) – Current item in array style.
|
-
gridAfter($config, $objects, &$items)
Trigger after execute query for a grid of model’s items.
Parameters: |
- $config (array) – Configuration of the query.
- $objects (array) – Array of instances of model, result of the query.
- $items (array) – Current array of items in array style.
|
-
commonConfig(&$config)
Trigger when building a common configuration of a model.
Parameters: |
- $config (array) – Current configuration.
|
-
crudConfig(&$config, $controller)
Trigger when building the configuration of the CRUD controller of the model.
Parameters: |
- $config (array) – Current configuration of the CRUD controller.
- $controller (mixed) – Instance of the CRUD controller.
|
-
crudFields(&$fields, $controller)
Trigger when building the fields for the CRUD controller of the model.
Parameters: |
- $fields (array) – Current fields of the CRUD controller.
- $controller (mixed) – Instance of the CRUD controller.
|
-
buildRelations()
Trigger when building relations of the model.
-
before_query(&$options)
Trigger before execute a query build on the model.
Parameters: |
- $options (array) – Current options for the query.
|