plugin/team/Manager/TeamManager.php
private function computeValidRoleTranslationKey(Workspace $workspace, $key)
    {
        $i = 1;
        $translationKey = $key;
        $role = $this->roleManager->getRoleByTranslationKeyAndWorkspace($translationKey, $workspace);

        while (!is_null($role)) {
            $translationKey = $key.' ('.$i.')';
            $role = $this->roleManager->getRoleByTranslationKeyAndWorkspace($translationKey, $workspace);
            ++$i;
        }

        return $translationKey;
    }
private function computeValidRoleTranslationKey(Workspace $workspace, $key)
    {
        $i = 1;
        $translationKey = $key;
        $role = $this->roleManager->getRoleByTranslationKeyAndWorkspace($translationKey, $workspace);

        while (!is_null($role)) {
            $translationKey = $key.' ('.$i.')';
            $role = $this->roleManager->getRoleByTranslationKeyAndWorkspace($translationKey, $workspace);
            ++$i;
        }

        return $translationKey;
    }
private function computeValidRoleTranslationKey ( Workspace $ workspace , $ key ) { $ i = 1 ; $ translationKey = $ key ; $ role = $ this -> roleManager -> getRoleByTranslationKeyAndWorkspace ( $ translationKey , $ workspace ) ; while ( ! is_null ( $ role ) ) { $ translationKey = $ key . ' (' . $ i . ')' ; $ role = $ this -> roleManager -> getRoleByTranslationKeyAndWorkspace ( $ translationKey , $ workspace ) ; ++ $ i ; } return $ translationKey ; }
Checks and updates role translation key for unicity.

@param Workspace $workspace
@param string    $key

@return string
Checks and updates role translation key for unicity .