0
Q:

shopware 5 plugin theme_less_collection

    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));
    } 	
0
   public static function getSubscribedEvents()
    {
      return [
        'Enlight_Controller_Action_PostDispatchSecure_Frontend' => 'onFrontendPostDispatch',
        'Theme_Compiler_Collect_Plugin_Less' => 'addLessFiles',
      ];
    }
0

New to Communities?

Join the community