1 | <?php |
||
11 | class Extension extends CompilerExtension |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * Default configuration |
||
16 | * @var array |
||
17 | */ |
||
18 | public $defaults = [ |
||
19 | // Public www dir |
||
20 | 'wwwDir' => '%wwwDir%', |
||
21 | // Assets revision manifest |
||
22 | 'manifest' => NULL, |
||
23 | // Paths for manifest autodetection |
||
24 | 'autodetect' => [ |
||
25 | 'assets.json', |
||
26 | 'busters.json', |
||
27 | 'versions.json', |
||
28 | 'manifest.json', |
||
29 | 'rev-manifest.json', |
||
30 | ], |
||
31 | // Check the existence of asset file |
||
32 | 'existCheck' => TRUE, |
||
33 | // Error handling |
||
34 | 'missingAsset' => 'notice', // exception, notice, or ignore |
||
35 | 'missingManifest' => 'notice', // exception, notice, or ignore |
||
36 | 'missingRevision' => 'ignore', // exception, notice, or ignore |
||
37 | ]; |
||
38 | |||
39 | |||
40 | public function beforeCompile() |
||
63 | |||
64 | |||
65 | /** |
||
66 | * @param string $key |
||
67 | * @param array $choices |
||
68 | */ |
||
69 | 1 | private function validateChoices($key, array $choices) |
|
80 | |||
81 | } |
||
82 |