1 | <?php |
||
22 | class SlotViewHelperService implements SingletonInterface |
||
23 | { |
||
24 | /** |
||
25 | * Contains the closures which will render the registered slots. The keys |
||
26 | * of this array are the names of the slots. |
||
27 | * |
||
28 | * @var Closure[] |
||
29 | */ |
||
30 | private $closures = []; |
||
31 | |||
32 | /** |
||
33 | * @var array[] |
||
34 | */ |
||
35 | private $arguments = []; |
||
36 | |||
37 | /** |
||
38 | * @var array[] |
||
39 | */ |
||
40 | private $injectedVariables = []; |
||
41 | |||
42 | /** |
||
43 | * @var array[] |
||
44 | */ |
||
45 | private $savedVariables = []; |
||
46 | |||
47 | /** |
||
48 | * Adds a closure - which will render the slot with the given name - to the |
||
49 | * private storage in this class. |
||
50 | * |
||
51 | * @param string $name |
||
52 | * @param Closure $closure |
||
53 | * @param array $arguments |
||
54 | */ |
||
55 | public function addSlot($name, Closure $closure, array $arguments) |
||
60 | |||
61 | /** |
||
62 | * Returns the closure which will render the slot with the given name. |
||
63 | * |
||
64 | * @param string $name |
||
65 | * @return Closure |
||
66 | * @throws EntryNotFoundException |
||
67 | */ |
||
68 | public function getSlotClosure($name) |
||
76 | |||
77 | /** |
||
78 | * Returns the closure which will render the slot with the given name. |
||
79 | * |
||
80 | * @param string $name |
||
81 | * @return array |
||
82 | * @throws EntryNotFoundException |
||
83 | */ |
||
84 | public function getSlotArguments($name) |
||
92 | |||
93 | /** |
||
94 | * @param string $name |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function hasSlot($name) |
||
101 | |||
102 | /** |
||
103 | * Will merge the given arguments with the ones registered by the given |
||
104 | * slot, and inject them in the template variable container. |
||
105 | * |
||
106 | * Note that the variables that are already defined are first saved before |
||
107 | * being overridden, so they can be restored later. |
||
108 | * |
||
109 | * @param string $slotName |
||
110 | * @param array $arguments |
||
111 | * @param RenderingContextInterface $renderingContext |
||
112 | */ |
||
113 | public function addTemplateVariables($slotName, array $arguments, RenderingContextInterface $renderingContext) |
||
135 | |||
136 | /** |
||
137 | * Will remove all variables previously injected in the template variable |
||
138 | * container, and restore the ones that were saved before being overridden. |
||
139 | * |
||
140 | * @param string $slotName |
||
141 | * @param RenderingContextInterface $renderingContext |
||
142 | */ |
||
143 | public function restoreTemplateVariables($slotName, RenderingContextInterface $renderingContext) |
||
157 | |||
158 | /** |
||
159 | * Resets the service variables. |
||
160 | */ |
||
161 | public function resetState() |
||
168 | } |
||
169 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.