Skip to content

Commit 2e7399a

Browse files
committed
docs: improve readability
1 parent 14c3045 commit 2e7399a

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

user_guide_src/source/models/model.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,12 +738,20 @@ points in the model's execution can be affected, each through a class property:
738738
Defining Callbacks
739739
==================
740740

741-
You specify the callbacks by first creating a new class method in your model to use. This class method will always
742-
receive a ``$data`` array as its only parameter. The exact contents of the ``$data`` array will vary between events, but
743-
will always contain a key named **data** that contains the primary data passed to the original method. In the case
744-
of the insert* or update* methods, that will be the key/value pairs that are being inserted into the database. The
745-
main array will also contain the other values passed to the method, and be detailed later. The callback method
746-
must return the original $data array so other callbacks have the full information.
741+
You specify the callbacks by first creating a new class method in your model to use.
742+
743+
This class method will always
744+
receive a ``$data`` array as its only parameter.
745+
746+
The exact contents of the ``$data`` array will vary between events, but
747+
will always contain a key named ``data`` that contains the primary data passed to the original method.
748+
In the case
749+
of the **insert*()** or **update*()** methods, that will be the key/value pairs that are being inserted into the database.
750+
The
751+
main ``$data`` array will also contain the other values passed to the method, and be detailed in `Event Parameters`_.
752+
753+
The callback method
754+
must return the original ``$data`` array so other callbacks have the full information.
747755

748756
.. literalinclude:: model/050.php
749757

0 commit comments

Comments
 (0)