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);
    }
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);
    }
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 ) ; }
Hydrate group with the provided puppet modules data.

@param  PuppetModule[] $puppetModules
@param  GroupInterface $group
@return GroupInterface
Hydrate group with the provided puppet modules data .