Skip to content

Kirby 5.0.2

$kirby->contentToken()

Generates a non-guessable token based on model data and a configured salt

$kirby->contentToken(object|null $model, string $value): string

Parameters

Name Type Default Description
$model objectornull no default value Object to pass to the salt callback if configured
$valuerequired string no default value Model data to include in the generated token

Return type

string

Parent class

Kirby\Cms\App


By default, the results depends on the full file system path. If you want to have reliable results independent of the environment, make sure to set content.salt option.