Skip to content

Kirby 3.9.8

UserRules::validLanguage()

Validates a user language code

UserRules::validLanguage(Kirby\Cms\User $user, string $language): bool

Parameters

Name Type Default
$user * Kirby\Cms\User
$language * string

Return type

bool

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the language does not exist

Parent class

Kirby\Cms\UserRules