Skip to content

Kirby 4.1.0

$kirby->controller()

Calls a page controller by name and with the given arguments

$kirby->controller(string $name, array $arguments = [ ], string $contentType = 'html'): array

Parameters

Name Type Default
$name * string
$arguments array [ ]
$contentType string 'html'

Return type

array

Parent class

Kirby\Cms\App

Example

See Shared controllers