Skip to content

Kirby 5.0.4

$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
$namerequired string no default value
$arguments array [ ]
$contentType string 'html'

Return type

array

This method modifies the existing $app object it is applied to and returns it again.

Parent class

Kirby\Cms\App

Examples

See Shared controllers