setConcatenatedStyles example

public static function getSubscribedEvents(): array
    {
        return [
            ThemeCompilerConcatenatedStylesEvent::class => 'onGetConcatenatedStyles',
            ThemeCompilerConcatenatedScriptsEvent::class => 'onGetConcatenatedScripts',
        ];
    }

    public function onGetConcatenatedStyles(ThemeCompilerConcatenatedStylesEvent $event): void
    {
        $event->setConcatenatedStyles($event->getConcatenatedStyles() . self::STYLES_CONCAT);
    }

    public function onGetConcatenatedScripts(ThemeCompilerConcatenatedScriptsEvent $event): void
    {
        $event->setConcatenatedScripts($event->getConcatenatedScripts() . self::SCRIPTS_CONCAT);
    }
}
Home | Imprint | This part of the site doesn't use cookies.