Reference

Guide

$page->controller()

Call the page controller

$page->controller(array $data = [ ], string $contentType = 'html'): array

Parameters

Name Type Default Description
$data array [ ]
$contentType string 'html'

Return type

array

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException

If the controller returns invalid objects for kirby, site, pages or page

Source code

kirby/src/Cms/Page.php#L337