1 | <?php |
||
17 | class TwigAssetic implements PluginInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var AssetFactory |
||
21 | */ |
||
22 | protected $factory; |
||
23 | |||
24 | /** |
||
25 | * @var AssetWriter |
||
26 | */ |
||
27 | protected $writer; |
||
28 | |||
29 | /** |
||
30 | * Class constructor |
||
31 | * |
||
32 | * @param AssetFactory $factory |
||
33 | * @param AssetWriter $writer |
||
34 | */ |
||
35 | 4 | public function __construct(AssetFactory $factory, AssetWriter $writer) |
|
40 | |||
41 | /** |
||
42 | * Check that the view is a twig view |
||
43 | * |
||
44 | * @param ViewInterface $view |
||
45 | * @throws \InvalidArgumentException |
||
46 | */ |
||
47 | 4 | protected function assertView(ViewInterface $view) |
|
53 | |||
54 | /** |
||
55 | * Called when the plugin is added to the view. |
||
56 | * |
||
57 | * @param ViewInterface $view |
||
58 | */ |
||
59 | 3 | public function onAdd(ViewInterface $view) |
|
63 | |||
64 | |||
65 | /** |
||
66 | * Create an assetic formula loader. |
||
67 | * @codeCoverageIgnore |
||
68 | * |
||
69 | * @param \Twig_Environment $twig |
||
70 | * @return TwigFormulaLoader |
||
71 | */ |
||
72 | protected function createFormulaLoader($twig) |
||
76 | |||
77 | /** |
||
78 | * Create an assetic asset manager. |
||
79 | * @codeCoverageIgnore |
||
80 | * |
||
81 | * @param TwigFormulaLoader $loader |
||
82 | * @return LazyAssetManager |
||
83 | */ |
||
84 | protected function createAssetManager(TwigFormulaLoader $loader) |
||
88 | |||
89 | /** |
||
90 | * Create an assetic twig resource. |
||
91 | * @codeCoverageIgnore |
||
92 | * |
||
93 | * @param \Twig_Environment $twig |
||
94 | * @param string $template |
||
95 | * @return TwigResource |
||
96 | */ |
||
97 | protected function createResource($twig, $template) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Called when view renders a template. |
||
105 | * |
||
106 | * @param ViewInterface $view |
||
107 | * @param string $template Template filename |
||
108 | * @param array $context |
||
109 | */ |
||
110 | 1 | public function onRender(ViewInterface $view, $template, array $context) |
|
126 | } |
||
127 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.