Reference

Guide

$kirby->trigger()

Trigger a hook by name

$kirby->trigger(string $name, array $args = [ ], Kirby\Cms\Event $originalEvent = null): void

Parameters

Name Type Default Description
$name string

Full event name

$args array [ ]

Associative array of named event arguments

$originalEvent Kirby\Cms\Event null

Event object (internal use)

Source code

kirby/src/Cms/App.php#L1414