public function translateToRoleNames($roles)
    {
        if (!is_array($roles)) {
            if ($roles) {
                $roles = explode(",", $roles);
            } else {
                $roles = array();
            }
        }
        foreach ($roles as $key => $role) {
            if (isset($this->_roleTranslations[$role])) {
                $roles[$key] = $this->_roleTranslations[$role];
            }
        }

        return $roles;
    }
public function translateToRoleNames($roles)
    {
        if (!is_array($roles)) {
            if ($roles) {
                $roles = explode(",", $roles);
            } else {
                $roles = array();
            }
        }
        foreach ($roles as $key => $role) {
            if (isset($this->_roleTranslations[$role])) {
                $roles[$key] = $this->_roleTranslations[$role];
            }
        }

        return $roles;
    }
public function translateToRoleNames ( $ roles ) { if ( ! is_array ( $ roles ) ) { if ( $ roles ) { $ roles = explode ( "," , $ roles ) ; } else { $ roles = array ( ) ; } } foreach ( $ roles as $ key => $ role ) { if ( isset ( $ this -> _roleTranslations [ $ role ] ) ) { $ roles [ $ key ] = $ this -> _roleTranslations [ $ role ] ; } } return $ roles ; }
Translate all numeric role id's to string names

@param mixed $roles string or array
@return array
Translate all numeric role id s to string names