src/Service/MelisCoreModulesService.php
public function getVendorModules()
    {
        $repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();

        $packages = array_filter($repos->getPackages(), function ($package) {
            /** @var CompletePackage $package */
            return $package->getType() === 'melisplatform-module' &&
                array_key_exists('module-name', $package->getExtra());
        });

        $modules = array_map(function ($package) {
            /** @var CompletePackage $package */
            return $package->getExtra()['module-name'];
        }, $packages);

        sort($modules);

        return $modules;
    }
public function getVendorModules()
    {
        $repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();

        $packages = array_filter($repos->getPackages(), function ($package) {
            /** @var CompletePackage $package */
            return $package->getType() === 'melisplatform-module' &&
                array_key_exists('module-name', $package->getExtra());
        });

        $modules = array_map(function ($package) {
            /** @var CompletePackage $package */
            return $package->getExtra()['module-name'];
        }, $packages);

        sort($modules);

        return $modules;
    }
public function getVendorModules ( ) { $ repos = $ this -> getComposer ( ) -> getRepositoryManager ( ) -> getLocalRepository ( ) ; $ packages = array_filter ( $ repos -> getPackages ( ) , function ( $ package ) { /** @var CompletePackage $package */ return $ package -> getType ( ) === 'melisplatform-module' && array_key_exists ( 'module-name' , $ package -> getExtra ( ) ) ; } ) ; $ modules = array_map ( function ( $ package ) { /** @var CompletePackage $package */ return $ package -> getExtra ( ) [ 'module-name' ] ; } , $ packages ) ; sort ( $ modules ) ; return $ modules ; }
Returns all melisplatform-module packages loaded by composer
@return array
Returns all melisplatform - module packages loaded by composer