Skip to content

Kirby 3.5.7.1

$api->data()

Returns the injected data array or certain parts of it by key

$api->data(string|null $key = null, mixed $args = null): mixed

Parameters

Name Type Default
$key string|null null
$args mixed null

Return type

mixed

Exceptions

Type Description
Kirby\Exception\NotFoundException If no data for $key exists

Parent class

Kirby\Api\Api