Skip to content

Kirby 6.0.0

$api->fieldApi()

$api->fieldApi(ModelWithContent $model, string $name, string|null $path = null): mixed

Parameters

Name Type Default
$modelrequired Kirby\Cms\ModelWithContent no default value
$namerequired string no default value
$path stringornull null

Return type

mixed

Exceptions

Type Description
Kirby\Exception\NotFoundException if the field type cannot be found or the field cannot be loaded

Parent class

Kirby\Api\Api