Skip to content

docs: improve Model Event #8324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 14, 2023
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Dec 12, 2023

Description
Closes #8306

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • User guide updated
  • [] Conforms to style guide

Comment on lines 748 to 751
In the case
of the **insert*()** or **update*()** methods, that will be the key/value pairs that are being inserted into the database.
The
main ``$data`` array will also contain the other values passed to the method, and be detailed in `Event Parameters`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the case
of the **insert*()** or **update*()** methods, that will be the key/value pairs that are being inserted into the database.
The
main ``$data`` array will also contain the other values passed to the method, and be detailed in `Event Parameters`_.
In the case of the **insert*()** or **update*()** methods, that will be the key/value pairs that are being inserted into the database.
The main ``$data`` array will also contain the other values passed to the method, and be detailed in `Event Parameters`_.

Just joining lines together nicely. Not sure if you meant those to be two paragraphs or one, so adjust as desired.

Comment on lines 753 to 754
The callback method
must return the original ``$data`` array so other callbacks have the full information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The callback method
must return the original ``$data`` array so other callbacks have the full information.
The callback method must return the original ``$data`` array so other callbacks have the full information.

@kenjis kenjis merged commit 3d742a3 into codeigniter4:develop Dec 14, 2023
@kenjis kenjis deleted the docs-model-event branch December 14, 2023 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests for documentation only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Call delete on Model with where can not get delete id(s) in afterDelete callback
3 participants