We use essential cookies to run this site. With your permission, we record the pages you visit and checkout steps, link them to your order, and use Google Analytics.
This page lists the hooks available to plugins and themes. Published hook names and signatures are a contract: they do not break in minor releases, and a hook is announced as deprecated before it is removed.
use September\Core\Hook\Hook;
Hook::addAction('name', $callback, 10); // runs when the event happens
Hook::addFilter('name', $callback, 10); // receives a value, returns it modified
Actions
Core and request
Hook
When
Arguments
core.booting
After environment, config and error handler are set up, before plugins load
Application $app
core.booted
When boot is complete
Application $app
routes.register
After core routes load; plugins add routes here
Router $router
request.received
Before the request is matched to a route
Request $request
response.sending
Right before the response is sent
Response $response, Request $request
session.started
When the session starts
—
Models and database
Hook
When
Arguments
model.creating / model.created
Before / after a record is inserted (id assigned)
Model $model
model.updating / model.updated
Before / after a record is updated
Model $model
model.deleting / model.deleted
Before / after a record is deleted
Model $model
migrate.completed
When migrate finishes
list<string> $ran
seed.completed
When db:seed finishes
string $seederClass
Themes and plugins
Hook
When
Arguments
theme.activated
When the theme is changed
string $slug
plugin.activated
When a plugin is activated (after its migrations run)
string $slug
plugin.deactivated
When a plugin is deactivated
string $slug
plugin.failed
When a plugin fails at boot and is deactivated automatically
string $slug, Throwable $e
settings.updated
When settings are saved in the admin panel
array $values
Membership and interaction
Hook
When
Arguments
auth.registered
When a new member registration completes
User $user
auth.login
On successful login
User $user
auth.login_failed
On a failed login attempt
string $email
auth.logout
On logout
User $user
user.profile_updated
When a profile is updated
User $user
user.password_changed
When a password is changed
User $user
content.viewed
On a unique view of a detail page
Movie|Serie|Episode $model
interaction.toggled
When watched / watchlist / favourite is toggled
User $user, string $type, string $targetType, int $targetId, bool $active
review.created
When a new review is posted
Review $review
review.replied
When a review receives a reply
Review $reply, Review $parent
report.created
When an issue report is created
Report $report
Filters
Views, language and system
Hook
What it changes
Signature
view.resolve
File path of the template to render
(string $path, string $viewName): string
view.data.{view}
Data passed to a specific view (e.g. view.data.welcome)
(array $data): array
validation.rules.{form}
Validation rules of a form (e.g. validation.rules.kayit)