Hydrate group with the provided puppet modules data.

@param  PuppetModule[] $puppetModules
@param  GroupInterface $group
@return GroupInterface
338001
public function hydrate($puppetModules, $group)
    {
        $availableClasses = [];
        if (!empty($puppetModules)) {
            foreach ($puppetModules as $puppetModule) {
                if ($puppetModule->hasClasses()) {
                    foreach ($puppetModule->getClasses() as $puppetClass) {
                        $groupClass = $group->getClassByName($puppetClass->getName());
                        if ($groupClass != null) {
                            if ($puppetClass->hasParametersTemplates()) {
                                $this->groupClassHydrator->hydrate($puppetClass->getParametersTemplates(), $groupClass);
                            }
                        } else {
                            $availableClasses[$puppetModule->getName()][] = $puppetClass->getName();
                        }
                    }
                }
            }
        }
        return $group->setAvailableClasses($availableClasses);
    }
769671
public function leaveGroup(ModelInterface $group): PodiumResponse
    {
        return $this->getPodium()->member->leave($this->ensureMembership(), $group);
    }
159634
public function hydrate(array $items)
    {
        $instance = $this->model->newInstance();

        return $instance->newCollection(array_map(function ($item) use ($instance) {
            return $instance->newFromBuilder($item);
        }, $items));
    }
769774
public function addGroup(Group ...$groups)
    {
        collect($groups)->map(function ($group) {
            $this->group['groups'][] = $group->get();
        });

        return $this;
    }
893870
public function attachGroup(TagGroup $group)
    {
        if (!$this->hasGroup($group)) {
            $this->_groups[] = $group;
        }

        return $this;
    }
748871
public function findAllInGroup(GroupInterface $group)
	{
		return array_filter($this->findAll(), function($user) use ($group)
		{
			return $user->inGroup($group);
		});
	}
1168198
public function getTabGroup(string $group): TabGroup
    {
        if (!isset($this->tabGroups[$group])) {
            throw new \InvalidArgumentException(sprintf('Requested group named "%s" is not found. Did you forget to tag the service?', $group));
        }

        return $this->tabGroups[$group];
    }
540992
public function formForGroupAction(Group $group)
    {
        $url = $this->router->generate('claro_message_show', array('message' => 0))
            . '?grpsIds[]=' . $group->getId();

        return new RedirectResponse($url);
    }
1295744
private function buildMiddlewareQueue(array $groups)
    {
        $queue = [];
        $middlewareList = $this->config('app')['middleware'];

        $groupsIterator = new \RecursiveIteratorIterator(
            new \RecursiveArrayIterator($groups)
        );

        foreach ($groupsIterator as $middleware) {
            $current = $middlewareList[$middleware];

            foreach ((array) $current as $curr) {
                $queue[] = $curr;
            }
        }

        return $queue;
    }
266017
public function setGroups($groups)
    {
        foreach ($groups as $key => $dtoData) {
            $this->groups[$key] = new GroupDto($dtoData);
        }
    
        return $this;
    }
876533
public function inGroup(GroupInterface $group)
	{
		foreach ($this->getGroups() as $_group)
		{
			if ($_group->getId() == $group->getId())
			{
				return true;
			}
		}

		return false;
	}
457660
public function addGroup(Group $group)
    {
        $this->groups->put($group->getName(), $group);

        return $this;
    }
267006
public function hasGroup(GroupInterface $group): bool
    {
        foreach ($this->groups as $my_group) {
            if ($group->isEqualTo($my_group)) {
                return true;
            }
        }

        return false;
    }
1343444
public function insertGroup(Group $group)
    {
        try {
            return $this->innerGateway->insertGroup($group);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
98565
public function removeGroup(GroupInterface $group)
    {
        if ($this->hasGroup($group)) {
            $this->groups->removeElement($group);
        }

        return $this;
    }
1214680
public function withGroup($group)
    {
        $group = str_replace('\\', '/', $group);
        if (!isset(static::$instances[$group])) {
            $instance = new static($this->options);
            $instance->setGroup($group);
            static::$instances[$group] = $instance;
        }
        return static::$instances[$group];
    }
1096104
public function group(string $group, array $data = [], ?callable $callback = null): self
    {
        $data = new Data($data);

        // No callback, set prepared group
        $this->preparedGroups[$group] = $data;

        $new = $this->cloneInstance();
        $new->setOptions($data);
        $new->package((string) $this->getOption('package'));
        $new->group = $group;
        $new->groups[$group] = $data;

        // Find parents
        if (isset($data['parents'])) {
            $this->parents((array) $data['parents']);
        }

        if ($callback) {
            $this->groups[$group] = $data;

            $callback($this);

            array_pop($this->groups);
        }

        return $new;
    }