Skip to content

Kirby 5.0.4

$languagePermissions->can()

Returns whether the current user is allowed to do a certain action on the model

$languagePermissions->can(string $action, bool $default = false): bool

Parameters

Name Type Default Description
$actionrequired string no default value
$default bool false Will be returned if $action does not exist

Return type

bool

This method modifies the existing $languagepermissions object it is applied to and returns it again.

Parent class

Kirby\Cms\LanguagePermissions inherited from Kirby\Cms\ModelPermissions