Packages example


    public function addAssetPackage(string $bundleName, string $bundlePath): void
    {
        Feature::triggerDeprecationOrThrow('v6.6.0.0', Feature::deprecatedMethodMessage(self::class, 'addAssetPackage', 'Will be automatically registered'));
    }

    /** * @param array<string, string> $bundleMap */
    public static function create(array $bundleMap, Package $package, VersionStrategyInterface $versionStrategy, mixed ...$args): Packages
    {
        $packages = new Packages(...$args);

        foreach ($bundleMap as $bundleName => $bundlePath) {
            $path = $package->getUrl('/bundles/' . mb_strtolower($bundleName));
            $packages->addPackage(
                '@' . $bundleName,
                new UrlPackage($pathnew PrefixVersionStrategy('/bundles/' . mb_strtolower($bundleName)$versionStrategy))
            );
        }

        return $packages;
    }
}
Home | Imprint | This part of the site doesn't use cookies.