1 | <?php |
||
20 | class OutputAwareAssetsInstaller extends AssetsInstaller implements OutputAwareInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var OutputInterface |
||
24 | */ |
||
25 | protected $output; |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function setOutput(OutputInterface $output) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function installAssets($targetDir, $symlinkMask) |
||
39 | { |
||
40 | if ($this->hasOutput()) { |
||
41 | $this->output->writeln($this->provideExpectationComment($symlinkMask)); |
||
42 | } |
||
43 | |||
44 | return parent::installAssets($targetDir, $symlinkMask); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function installBundleAssets(BundleInterface $bundle, $targetDir, $symlinkMask) |
||
70 | |||
71 | /** |
||
72 | * @return bool |
||
73 | */ |
||
74 | private function hasOutput() |
||
78 | |||
79 | /** |
||
80 | * @param int $symlinkMask |
||
81 | * @param int $effectiveSymlinkMask |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | private function provideResultComment($symlinkMask, $effectiveSymlinkMask) |
||
108 | |||
109 | /** |
||
110 | * @param int $symlinkMask |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | private function provideExpectationComment($symlinkMask) |
||
122 | } |
||
123 |