@@ 21-39 (lines=19) @@ | ||
18 | $cssFiles = $this->view->cssFiles; |
|
19 | $this->view->cssFiles = []; |
|
20 | $toMinify = []; |
|
21 | if (!empty($cssFiles)) { |
|
22 | foreach ($cssFiles as $file => $html) { |
|
23 | if ($this->thisFileNeedMinify($file, $html)) { |
|
24 | if ($this->view->concatCss) { |
|
25 | $toMinify[$file] = $html; |
|
26 | } else { |
|
27 | $this->process([$file => $html]); |
|
28 | } |
|
29 | } else { |
|
30 | if (!empty($toMinify)) { |
|
31 | $this->process($toMinify); |
|
32 | $toMinify = []; |
|
33 | } |
|
34 | $this->view->cssFiles[$file] = $html; |
|
35 | } |
|
36 | } |
|
37 | } |
|
38 | if (!empty($toMinify)) { |
|
39 | $this->process($toMinify); |
|
40 | } |
|
41 | unset($toMinify); |
|
42 | } |
@@ 32-46 (lines=15) @@ | ||
29 | $this->view->jsFiles[$position] = []; |
|
30 | $toMinify = []; |
|
31 | foreach ($files as $file => $html) { |
|
32 | if ($this->thisFileNeedMinify($file, $html)) { |
|
33 | if ($this->view->concatJs) { |
|
34 | $toMinify[$file] = $html; |
|
35 | } else { |
|
36 | $this->process($position, $jsOptions, [$file => $html]); |
|
37 | } |
|
38 | } else { |
|
39 | if (!empty($toMinify)) { |
|
40 | $this->process($position, $jsOptions, $toMinify); |
|
41 | $toMinify = []; |
|
42 | } |
|
43 | $this->view->jsFiles[$position][$file] = $html; |
|
44 | } |
|
45 | } |
|
46 | if (!empty($toMinify)) { |
|
47 | $this->process($position, $jsOptions, $toMinify); |
|
48 | } |
|
49 | unset($toMinify); |