public function getAllGroups()
    {
        $result = new \Tx_Oelib_List();
        $groupsToProcess = $this->getGroups();

        do {
            $groupsForNextStep = new \Tx_Oelib_List();
            $result->append($groupsToProcess);
            /** @var \Tx_Oelib_Model_BackEndUserGroup $group */
            foreach ($groupsToProcess as $group) {
                $subgroups = $group->getSubgroups();
                /** @var \Tx_Oelib_Model_BackEndUserGroup $subgroup */
                foreach ($subgroups as $subgroup) {
                    if (!$result->hasUid($subgroup->getUid())) {
                        $groupsForNextStep->add($subgroup);
                    }
                }
            }
            $groupsToProcess = $groupsForNextStep;
        } while (!$groupsToProcess->isEmpty());

        return $result;
    }
public function getAllGroups()
    {
        $result = new \Tx_Oelib_List();
        $groupsToProcess = $this->getGroups();

        do {
            $groupsForNextStep = new \Tx_Oelib_List();
            $result->append($groupsToProcess);
            /** @var \Tx_Oelib_Model_BackEndUserGroup $group */
            foreach ($groupsToProcess as $group) {
                $subgroups = $group->getSubgroups();
                /** @var \Tx_Oelib_Model_BackEndUserGroup $subgroup */
                foreach ($subgroups as $subgroup) {
                    if (!$result->hasUid($subgroup->getUid())) {
                        $groupsForNextStep->add($subgroup);
                    }
                }
            }
            $groupsToProcess = $groupsForNextStep;
        } while (!$groupsToProcess->isEmpty());

        return $result;
    }
public function getAllGroups ( ) { $ result = new \ Tx_Oelib_List ( ) ; $ groupsToProcess = $ this -> getGroups ( ) ; do { $ groupsForNextStep = new \ Tx_Oelib_List ( ) ; $ result -> append ( $ groupsToProcess ) ; /** @var \Tx_Oelib_Model_BackEndUserGroup $group */ foreach ( $ groupsToProcess as $ group ) { $ subgroups = $ group -> getSubgroups ( ) ; /** @var \Tx_Oelib_Model_BackEndUserGroup $subgroup */ foreach ( $ subgroups as $ subgroup ) { if ( ! $ result -> hasUid ( $ subgroup -> getUid ( ) ) ) { $ groupsForNextStep -> add ( $ subgroup ) ; } } } $ groupsToProcess = $ groupsForNextStep ; } while ( ! $ groupsToProcess -> isEmpty ( ) ) ; return $ result ; }
Recursively gets all groups and subgroups of this user.

@return \Tx_Oelib_List<\Tx_Oelib_Model_BackEndUserGroup> all groups and subgroups of this user, will be
empty if this user has no groups
Recursively gets all groups and subgroups of this user .