public static function addMainFiles(Config $config, PackageInterface $package, $section = 'main-files')
    {
        if ($package instanceof Package) {
            $packageExtra = $package->getExtra();
            $rootMainFiles = $config->getArray($section);

            foreach ($rootMainFiles as $packageName => $files) {
                if ($packageName === $package->getName()) {
                    $packageExtra['bower-asset-main'] = $files;

                    break;
                }
            }

            $package->setExtra($packageExtra);
        }

        return $package;
    }
public static function addMainFiles(Config $config, PackageInterface $package, $section = 'main-files')
    {
        if ($package instanceof Package) {
            $packageExtra = $package->getExtra();
            $rootMainFiles = $config->getArray($section);

            foreach ($rootMainFiles as $packageName => $files) {
                if ($packageName === $package->getName()) {
                    $packageExtra['bower-asset-main'] = $files;

                    break;
                }
            }

            $package->setExtra($packageExtra);
        }

        return $package;
    }
public static function addMainFiles ( Config $ config , PackageInterface $ package , $ section = 'main-files' ) { if ( $ package instanceof Package ) { $ packageExtra = $ package -> getExtra ( ) ; $ rootMainFiles = $ config -> getArray ( $ section ) ; foreach ( $ rootMainFiles as $ packageName => $ files ) { if ( $ packageName === $ package -> getName ( ) ) { $ packageExtra [ 'bower-asset-main' ] = $ files ; break ; } } $ package -> setExtra ( $ packageExtra ) ; } return $ package ; }
Adds the main file definitions from the root package.

@param Config           $config
@param PackageInterface $package
@param string           $section

@return PackageInterface
Adds the main file definitions from the root package .