Example #1
0
 /**
  * {@inheritdoc}
  */
 public function process(\Magento\Framework\View\Asset\PreProcessor\Chain $chain)
 {
     $chain->setContentType('less');
     $tmpFile = $this->fileGenerator->generateFileTree($chain);
     $cssContent = $this->adapter->process($tmpFile);
     $cssTrimmedContent = trim($cssContent);
     if (!empty($cssTrimmedContent)) {
         $chain->setContent($cssContent);
     }
     $chain->setContentType('css');
 }