Skip to content

Kirby 6.0.0

$kirby->apply()

Applies a hook to the given value

$kirby->apply(string $name, array $args, string|null $modify = null): mixed

Parameters

Name Type Default Description
$namerequired string no default value Full event name
$argsrequired array no default value Associative array of named arguments
$modify stringornull null Key in $args that is modified by the hooks (default: first argument)

Return type

mixed

Resulting value as modified by the hooks

Parent class

Kirby\Cms\App