1 | <?php |
||
22 | class SlotViewHelperService implements SingletonInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var SlotContextEntry[] |
||
26 | */ |
||
27 | protected $contextEntries = []; |
||
28 | |||
29 | /** |
||
30 | * @param RenderingContextInterface $renderingContext |
||
31 | */ |
||
32 | public function activate(RenderingContextInterface $renderingContext) |
||
36 | |||
37 | /** |
||
38 | * Removes the current context entry. |
||
39 | */ |
||
40 | public function resetState() |
||
44 | |||
45 | /** |
||
46 | * @see \Romm\Formz\Service\ViewHelper\Slot\SlotContextEntry::addSlot() |
||
47 | * |
||
48 | * @param string $name |
||
49 | * @param Closure $closure |
||
50 | * @param array $arguments |
||
51 | */ |
||
52 | public function addSlot($name, Closure $closure, array $arguments) |
||
56 | |||
57 | /** |
||
58 | * @see \Romm\Formz\Service\ViewHelper\Slot\SlotContextEntry::getSlotClosure() |
||
59 | * |
||
60 | * @param string $name |
||
61 | * @return Closure |
||
62 | * @throws EntryNotFoundException |
||
63 | */ |
||
64 | public function getSlotClosure($name) |
||
68 | |||
69 | /** |
||
70 | * @see \Romm\Formz\Service\ViewHelper\Slot\SlotContextEntry::getSlotArguments() |
||
71 | * |
||
72 | * @param string $name |
||
73 | * @return array |
||
74 | * @throws EntryNotFoundException |
||
75 | */ |
||
76 | public function getSlotArguments($name) |
||
80 | |||
81 | /** |
||
82 | * @see \Romm\Formz\Service\ViewHelper\Slot\SlotContextEntry::hasSlot() |
||
83 | * |
||
84 | * @param string $name |
||
85 | * @return bool |
||
86 | */ |
||
87 | public function hasSlot($name) |
||
91 | |||
92 | /** |
||
93 | * @see \Romm\Formz\Service\ViewHelper\Slot\SlotContextEntry::addTemplateVariables() |
||
94 | * |
||
95 | * @param string $slotName |
||
96 | * @param array $arguments |
||
97 | */ |
||
98 | public function addTemplateVariables($slotName, array $arguments) |
||
102 | |||
103 | /** |
||
104 | * @see \Romm\Formz\Service\ViewHelper\Slot\SlotContextEntry::restoreTemplateVariables() |
||
105 | * |
||
106 | * @param string $slotName |
||
107 | */ |
||
108 | public function restoreTemplateVariables($slotName) |
||
112 | |||
113 | /** |
||
114 | * @return SlotContextEntry |
||
115 | */ |
||
116 | protected function getCurrentContext() |
||
120 | } |
||
121 |