public function checkModelAccess($model, string $action, $user = null): bool
    {
        return $this->laModel->checkModelAccess($model, $action, $user);
    }
public function checkModelAccess($model, string $action, $user = null): bool
    {
        return $this->laModel->checkModelAccess($model, $action, $user);
    }
public function checkModelAccess ( $ model , string $ action , $ user = null ) : bool { return $ this -> laModel -> checkModelAccess ( $ model , $ action , $ user ) ; }
Twig extension callback for checking model access

If something goes wrong an error will be logged and the method will return FALSE. If no permissions are defined for this action on the provided model it will return TRUE.

@param object|string $model  A model object or class string.
@param string        $action Examples of model actions are "create", "read", "update" and "delete".
@param object|string $user   (optional) Either a user object or a string to signify an anonymous user. If no user is supplied, the current user will be used.

@return bool TRUE if access is granted or FALSE if access is denied.
Twig extension callback for checking model access