src/Service/MelisCoreModulesService.php
public function getChildDependencies($moduleName, $convertPackageNameToNamespace = true, $getOnlyActiveModules = true)
    {
        $modules = $this->getAllModules();
        $matchModule = $convertPackageNameToNamespace ? $moduleName : $this->convertToPackageName($moduleName);
        $dependents = [];

        foreach ($modules as $module) {
            $dependencies = $this->getDependencies($module, $convertPackageNameToNamespace);

            if ($dependencies) {
                if (in_array($matchModule, $dependencies)) {
                    $dependents[] = $convertPackageNameToNamespace ? $module : $this->convertToPackageName($module);
                }
            }
        }

        if (true === $getOnlyActiveModules) {

            $activeModules = $this->getActiveModules();
            $modules = [];

            foreach ($dependents as $module) {
                $modules[] = $module;
            }

            $dependents = $modules;
        }

        return $dependents;
    }
public function getChildDependencies($moduleName, $convertPackageNameToNamespace = true, $getOnlyActiveModules = true)
    {
        $modules = $this->getAllModules();
        $matchModule = $convertPackageNameToNamespace ? $moduleName : $this->convertToPackageName($moduleName);
        $dependents = [];

        foreach ($modules as $module) {
            $dependencies = $this->getDependencies($module, $convertPackageNameToNamespace);

            if ($dependencies) {
                if (in_array($matchModule, $dependencies)) {
                    $dependents[] = $convertPackageNameToNamespace ? $module : $this->convertToPackageName($module);
                }
            }
        }

        if (true === $getOnlyActiveModules) {

            $activeModules = $this->getActiveModules();
            $modules = [];

            foreach ($dependents as $module) {
                $modules[] = $module;
            }

            $dependents = $modules;
        }

        return $dependents;
    }
public function getChildDependencies ( $ moduleName , $ convertPackageNameToNamespace = true , $ getOnlyActiveModules = true ) { $ modules = $ this -> getAllModules ( ) ; $ matchModule = $ convertPackageNameToNamespace ? $ moduleName : $ this -> convertToPackageName ( $ moduleName ) ; $ dependents = [ ] ; foreach ( $ modules as $ module ) { $ dependencies = $ this -> getDependencies ( $ module , $ convertPackageNameToNamespace ) ; if ( $ dependencies ) { if ( in_array ( $ matchModule , $ dependencies ) ) { $ dependents [ ] = $ convertPackageNameToNamespace ? $ module : $ this -> convertToPackageName ( $ module ) ; } } } if ( true === $ getOnlyActiveModules ) { $ activeModules = $ this -> getActiveModules ( ) ; $ modules = [ ] ; foreach ( $ dependents as $ module ) { $ modules [ ] = $ module ; } $ dependents = $ modules ; } return $ dependents ; }
Returns an array of modules or packages that is dependent to the module name provided

@param $moduleName
@param bool $convertPackageNameToNamespace
@param bool $getOnlyActiveModules - returns only the active modules

@return array
Returns an array of modules or packages that is dependent to the module name provided