Component.php
private function _checkRoles($roles)
    {
        if (!$roles) {
            return true;
        }

        foreach ($roles as $role) {
            if (Yii::$app->user->can($role)) {
                return true;
            }
        }

        return false;
    }
private function _checkRoles($roles)
    {
        if (!$roles) {
            return true;
        }

        foreach ($roles as $role) {
            if (Yii::$app->user->can($role)) {
                return true;
            }
        }

        return false;
    }
private function _checkRoles ( $ roles ) { if ( ! $ roles ) { return true ; } foreach ( $ roles as $ role ) { if ( Yii :: $ app -> user -> can ( $ role ) ) { return true ; } } return false ; }
Determines if the current user has the necessary privileges for online translation.

@param array $roles The necessary roles for accessing the module.

@return bool
Determines if the current user has the necessary privileges for online translation .