# $productPage->controller()

> Call the page controller

- Source: `src/Cms/Page.php#L312` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Cms/Page.php#L312>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

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

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$data` | `array` | `[]` |
| `$contentType` | `string` | `'html'` |

## Return type

`array`

## Exceptions

| Type | Description |
| --- | --- |
| `InvalidArgumentException` | If the controller returns invalid objects for `kirby`, `site`, `pages` or `page` |

## Parent class

`Wagnerwagner\Merx\ProductPage` inherited from `Kirby\Cms\Page`
