1 | <?php |
||
40 | abstract class AbstractWidgetViewHelper extends AbstractCoreWidgetViewHelper implements ChildNodeAccessInterface |
||
41 | { |
||
42 | |||
43 | /** |
||
44 | * The Controller associated to this widget. |
||
45 | * This needs to be filled by the individual subclass by an @inject |
||
46 | * annotation. |
||
47 | * |
||
48 | * @var AbstractWidgetController |
||
49 | * @api |
||
50 | */ |
||
51 | protected $controller; |
||
52 | |||
53 | /** |
||
54 | * If set to TRUE, it is an AJAX widget. |
||
55 | * |
||
56 | * @var boolean |
||
57 | * @api |
||
58 | */ |
||
59 | protected $ajaxWidget = false; |
||
60 | |||
61 | /** |
||
62 | * @var AjaxWidgetContextHolder |
||
63 | */ |
||
64 | private $ajaxWidgetContextHolder; |
||
|
|||
65 | |||
66 | /** |
||
67 | * @var ObjectManagerInterface |
||
68 | */ |
||
69 | protected $objectManager; |
||
70 | |||
71 | /** |
||
72 | * @var \TYPO3\CMS\Extbase\Service\ExtensionService |
||
73 | * @inject |
||
74 | */ |
||
75 | protected $extensionService; |
||
76 | |||
77 | /** |
||
78 | * @var \TYPO3\CMS\Fluid\Core\Widget\WidgetContext |
||
79 | */ |
||
80 | private $widgetContext; |
||
81 | |||
82 | /** |
||
83 | * @var bool |
||
84 | */ |
||
85 | protected $escapeChildren = false; |
||
86 | |||
87 | /** |
||
88 | * @var bool |
||
89 | */ |
||
90 | protected $escapeOutput = false; |
||
91 | |||
92 | /** |
||
93 | * @param AjaxWidgetContextHolder $ajaxWidgetContextHolder |
||
94 | * @return void |
||
95 | */ |
||
96 | 24 | public function injectAjaxWidgetContextHolder(AjaxWidgetContextHolder $ajaxWidgetContextHolder) |
|
100 | |||
101 | /** |
||
102 | * @param ObjectManagerInterface $objectManager |
||
103 | * @return void |
||
104 | */ |
||
105 | 24 | public function injectObjectManager(ObjectManagerInterface $objectManager) |
|
110 | |||
111 | /** |
||
112 | * Initialize the arguments of the ViewHelper, and call the render() method of the ViewHelper. |
||
113 | * |
||
114 | * @return string the rendered ViewHelper. |
||
115 | */ |
||
116 | 24 | public function initializeArgumentsAndRender() |
|
123 | |||
124 | /** |
||
125 | * Initialize the Widget Context, before the Render method is called. |
||
126 | * |
||
127 | * @return void |
||
128 | */ |
||
129 | 24 | private function initializeWidgetContext() |
|
145 | |||
146 | /** |
||
147 | * Stores the syntax tree child nodes in the Widget Context, so they can be |
||
148 | * rendered with <f:widget.renderChildren> lateron. |
||
149 | * |
||
150 | * @param array $childNodes The SyntaxTree Child nodes of this ViewHelper. |
||
151 | * @return void |
||
152 | */ |
||
153 | 24 | public function setChildNodes(array $childNodes) |
|
162 | |||
163 | /** |
||
164 | * Generate the configuration for this widget. Override to adjust. |
||
165 | * |
||
166 | * @return array |
||
167 | * @api |
||
168 | */ |
||
169 | 24 | protected function getWidgetConfiguration() |
|
173 | |||
174 | /** |
||
175 | * Initiate a sub request to $this->controller. Make sure to fill $this->controller |
||
176 | * via Dependency Injection. |
||
177 | * |
||
178 | * @return \TYPO3\CMS\Extbase\Mvc\ResponseInterface the response of this request. |
||
179 | * @throws MissingControllerException |
||
180 | */ |
||
181 | 24 | protected function initiateSubRequest() |
|
197 | |||
198 | /** |
||
199 | * Pass the arguments of the widget to the subrequest. |
||
200 | * |
||
201 | * @param CoreWidgetRequest $subRequest |
||
202 | * @return void |
||
203 | */ |
||
204 | 24 | private function passArgumentsToSubRequest(CoreWidgetRequest $subRequest) |
|
215 | |||
216 | /** |
||
217 | * The widget identifier is unique on the current page, and is used |
||
218 | * in the URI as a namespace for the widget's arguments. |
||
219 | * |
||
220 | * @return string the widget identifier for this widget |
||
221 | * @return void |
||
222 | * @todo clean up, and make it somehow more routing compatible. |
||
223 | */ |
||
224 | 24 | private function initializeWidgetIdentifier() |
|
228 | } |
||
229 |