protected function getAssets(Composer $composer, $assetDir, array $packages)
    {
        $installationManager = $composer->getInstallationManager();
        $configPackages = $this->config->getArray('enable-packages');
        $assets = array();

        foreach ($packages as $package) {
            $filename = AssetUtil::getPath($installationManager, $this->assetManager, $package, $configPackages);

            if (null !== $filename) {
                list($packageName, $packagePath) = $this->getMockPackagePath($package, $assetDir, $filename);
                $assets[$packageName] = $packagePath;
            }
        }

        $assetsEvent = new GetAssetsEvent($assetDir, $packages, $assets);
        $composer->getEventDispatcher()->dispatch(FoxyEvents::GET_ASSETS, $assetsEvent);

        return $assetsEvent->getAssets();
    }
protected function getAssets(Composer $composer, $assetDir, array $packages)
    {
        $installationManager = $composer->getInstallationManager();
        $configPackages = $this->config->getArray('enable-packages');
        $assets = array();

        foreach ($packages as $package) {
            $filename = AssetUtil::getPath($installationManager, $this->assetManager, $package, $configPackages);

            if (null !== $filename) {
                list($packageName, $packagePath) = $this->getMockPackagePath($package, $assetDir, $filename);
                $assets[$packageName] = $packagePath;
            }
        }

        $assetsEvent = new GetAssetsEvent($assetDir, $packages, $assets);
        $composer->getEventDispatcher()->dispatch(FoxyEvents::GET_ASSETS, $assetsEvent);

        return $assetsEvent->getAssets();
    }
protected function getAssets ( Composer $ composer , $ assetDir , array $ packages ) { $ installationManager = $ composer -> getInstallationManager ( ) ; $ configPackages = $ this -> config -> getArray ( 'enable-packages' ) ; $ assets = array ( ) ; foreach ( $ packages as $ package ) { $ filename = AssetUtil :: getPath ( $ installationManager , $ this -> assetManager , $ package , $ configPackages ) ; if ( null !== $ filename ) { list ( $ packageName , $ packagePath ) = $ this -> getMockPackagePath ( $ package , $ assetDir , $ filename ) ; $ assets [ $ packageName ] = $ packagePath ; } } $ assetsEvent = new GetAssetsEvent ( $ assetDir , $ packages , $ assets ) ; $ composer -> getEventDispatcher ( ) -> dispatch ( FoxyEvents :: GET_ASSETS , $ assetsEvent ) ; return $ assetsEvent -> getAssets ( ) ; }
Get the package of asset dependencies.

@param Composer           $composer The composer
@param string             $assetDir The asset directory
@param PackageInterface[] $packages The package dependencies

@return array[]
Get the package of asset dependencies .