public function createAutoprefixerFilter(CreateFilterEvent $event)
 {
     // filter is already created
     if ($event->getFilter()) {
         return;
     }
     $configuration = $event->getConfiguration();
     // skip other filter types
     if ($configuration['type'] != 'autoprefixer') {
         return;
     }
     $filter = new AutoprefixerFilter();
     $filter->setCascade($configuration['autoprefixer_cascade']);
     $filter->setSafe($configuration['autoprefixer_safe']);
     $event->setFilter($filter);
 }
Exemplo n.º 2
0
 public function createYuiJsFilter(CreateFilterEvent $event)
 {
     // filter is already created
     if ($event->getFilter()) {
         return;
     }
     $configuration = $event->getConfiguration();
     // skip other filter types
     if ($configuration['type'] != 'yuiJs') {
         return;
     }
     if ($configuration['javaPath']) {
         $filter = new JsCompressorFilter($configuration['yuiPath'], $configuration['javaPath']);
     } else {
         $filter = new JsCompressorFilter($configuration['yuiPath']);
     }
     $event->setFilter($filter);
 }