Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

Less Files im Plugin einbinden / neues Plugin System

$
0
0

Hi und Servus,

ich versuche gerade im neuen Plugin-System ein Less File einzubinden und zwar so:

 

   public static function getSubscribedEvents()
    {
      return [
        'Enlight_Controller_Action_PostDispatchSecure_Frontend' => 'onFrontendPostDispatch',
        'Theme_Compiler_Collect_Plugin_Less' => 'addLessFiles',
      ];
    }
    public function addLessFiles(\Enlight_Event_EventArgs $args)
    {
        $less = new \Shopware\Components\Theme\LessDefinition(
        //configuration
        array(),

            //less files to compile
            array(
                __DIR__ . '/Resources/views/frontend/less/all.less'
            ),

            //import directory
            __DIR__
        );

        return new Doctrine\Common\Collections\ArrayCollection(array($less));
    } 	

 

Die Theme Kompilierung schlägt aber fehl... Hat jemand ne Idee, weshalb das nicht mehr so funktioniert? Ab 5.2.13 muss das Ding ja direkt
in der angegeben Resource liegen und wird automatisch eingebunden. Aber was ist mit Vorgängerversionen?

Vielen Dank und viele Grüße,

Chris


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>