Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
VariableNotation.php
Go to the documentation of this file.
1 <?php
8 
12 
18 class VariableNotation implements Asset\PreProcessorInterface
19 {
23  private $cssResolver;
24 
28  private $notationResolver;
29 
36  public function __construct(
37  CssResolver $cssResolver,
38  NotationResolver\Variable $notationResolver
39  ) {
40  $this->cssResolver = $cssResolver;
41  $this->notationResolver = $notationResolver;
42  }
43 
47  public function process(Chain $chain)
48  {
49  $callback = function ($path) {
50  return $this->notationResolver->convertVariableNotation($path);
51  };
52  $chain->setContent($this->cssResolver->replaceRelativeUrls($chain->getContent(), $callback));
53  }
54 }
__construct(CssResolver $cssResolver, NotationResolver\Variable $notationResolver)