@@ -24,8 +24,7 @@ discard block |
||
24 | 24 | * @subpackage dlf |
25 | 25 | * @access public |
26 | 26 | */ |
27 | -class TableOfContentsController extends AbstractController |
|
28 | -{ |
|
27 | +class TableOfContentsController extends AbstractController { |
|
29 | 28 | /** |
30 | 29 | * This holds the active entries according to the currently selected page |
31 | 30 | * |
@@ -45,8 +44,7 @@ discard block |
||
45 | 44 | * |
46 | 45 | * @return void |
47 | 46 | */ |
48 | - public function filterAction() |
|
49 | - { |
|
47 | + public function filterAction() { |
|
50 | 48 | // if filter was triggered, get filter parameters from POST variables |
51 | 49 | $this->filterParams = $this->getParametersSafely('filterParameter'); |
52 | 50 | |
@@ -59,8 +57,7 @@ discard block |
||
59 | 57 | * |
60 | 58 | * @return void |
61 | 59 | */ |
62 | - public function mainAction() |
|
63 | - { |
|
60 | + public function mainAction() { |
|
64 | 61 | // Load current document. |
65 | 62 | $this->loadDocument($this->requestData); |
66 | 63 | if ( |
@@ -91,8 +88,7 @@ discard block |
||
91 | 88 | * @access protected |
92 | 89 | * @return array HMENU array |
93 | 90 | */ |
94 | - protected function makeMenuArray() |
|
95 | - { |
|
91 | + protected function makeMenuArray() { |
|
96 | 92 | // Set default values for page if not set. |
97 | 93 | // $this->requestData['page'] may be integer or string (physical structure @ID) |
98 | 94 | if ( |
@@ -168,8 +164,7 @@ discard block |
||
168 | 164 | * |
169 | 165 | * @return array HMENU array |
170 | 166 | */ |
171 | - protected function makeMenuFor3DObjects() |
|
172 | - { |
|
167 | + protected function makeMenuFor3DObjects() { |
|
173 | 168 | $menuArray = []; |
174 | 169 | |
175 | 170 | // Go through table of contents and create all menu entries. |
@@ -192,8 +187,7 @@ discard block |
||
192 | 187 | * |
193 | 188 | * @return array HMENU array for menu entry |
194 | 189 | */ |
195 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
196 | - { |
|
190 | + protected function getMenuEntry(array $entry, $recursive = false) { |
|
197 | 191 | $entry = $this->resolveMenuEntry($entry); |
198 | 192 | |
199 | 193 | $entryArray = []; |
@@ -287,8 +281,7 @@ discard block |
||
287 | 281 | * @param array $entry |
288 | 282 | * @return array |
289 | 283 | */ |
290 | - protected function resolveMenuEntry($entry) |
|
291 | - { |
|
284 | + protected function resolveMenuEntry($entry) { |
|
292 | 285 | // If the menu entry points to the parent document, |
293 | 286 | // resolve to the parent UID set on indexation. |
294 | 287 | $doc = $this->document->getDoc(); |
@@ -304,8 +297,7 @@ discard block |
||
304 | 297 | return $entry; |
305 | 298 | } |
306 | 299 | |
307 | - protected function getMenuEntryWithImage(array $entry, $recursive = false) |
|
308 | - { |
|
300 | + protected function getMenuEntryWithImage(array $entry, $recursive = false) { |
|
309 | 301 | $entryArray = []; |
310 | 302 | |
311 | 303 | // don't filter if the entry type is collection or search params are empty |
@@ -31,8 +31,7 @@ discard block |
||
31 | 31 | * @subpackage dlf |
32 | 32 | * @access public |
33 | 33 | */ |
34 | -class BasketController extends AbstractController |
|
35 | -{ |
|
34 | +class BasketController extends AbstractController { |
|
36 | 35 | /** |
37 | 36 | * @var BasketRepository |
38 | 37 | */ |
@@ -41,8 +40,7 @@ discard block |
||
41 | 40 | /** |
42 | 41 | * @param BasketRepository $basketRepository |
43 | 42 | */ |
44 | - public function injectBasketRepository(BasketRepository $basketRepository) |
|
45 | - { |
|
43 | + public function injectBasketRepository(BasketRepository $basketRepository) { |
|
46 | 44 | $this->basketRepository = $basketRepository; |
47 | 45 | } |
48 | 46 | |
@@ -54,8 +52,7 @@ discard block |
||
54 | 52 | /** |
55 | 53 | * @param MailRepository $mailRepository |
56 | 54 | */ |
57 | - public function injectMailRepository(MailRepository $mailRepository) |
|
58 | - { |
|
55 | + public function injectMailRepository(MailRepository $mailRepository) { |
|
59 | 56 | $this->mailRepository = $mailRepository; |
60 | 57 | } |
61 | 58 | |
@@ -67,8 +64,7 @@ discard block |
||
67 | 64 | /** |
68 | 65 | * @param PrinterRepository $printerRepository |
69 | 66 | */ |
70 | - public function injectPrinterRepository(PrinterRepository $printerRepository) |
|
71 | - { |
|
67 | + public function injectPrinterRepository(PrinterRepository $printerRepository) { |
|
72 | 68 | $this->printerRepository = $printerRepository; |
73 | 69 | } |
74 | 70 | |
@@ -80,8 +76,7 @@ discard block |
||
80 | 76 | /** |
81 | 77 | * @param ActionLogRepository $actionLogRepository |
82 | 78 | */ |
83 | - public function injectActionLogRepository(ActionLogRepository $actionLogRepository) |
|
84 | - { |
|
79 | + public function injectActionLogRepository(ActionLogRepository $actionLogRepository) { |
|
85 | 80 | $this->actionLogRepository = $actionLogRepository; |
86 | 81 | } |
87 | 82 | |
@@ -90,8 +85,7 @@ discard block |
||
90 | 85 | * |
91 | 86 | * @return void |
92 | 87 | */ |
93 | - public function basketAction() |
|
94 | - { |
|
88 | + public function basketAction() { |
|
95 | 89 | $basket = $this->getBasketData(); |
96 | 90 | |
97 | 91 | // action remove from basket |
@@ -137,8 +131,7 @@ discard block |
||
137 | 131 | * |
138 | 132 | * @return void |
139 | 133 | */ |
140 | - public function addAction() |
|
141 | - { |
|
134 | + public function addAction() { |
|
142 | 135 | $basket = $this->getBasketData(); |
143 | 136 | |
144 | 137 | if ( |
@@ -156,8 +149,7 @@ discard block |
||
156 | 149 | * |
157 | 150 | * @return void |
158 | 151 | */ |
159 | - public function mainAction() |
|
160 | - { |
|
152 | + public function mainAction() { |
|
161 | 153 | $basket = $this->getBasketData(); |
162 | 154 | |
163 | 155 | $countDocs = 0; |
@@ -203,8 +195,7 @@ discard block |
||
203 | 195 | * |
204 | 196 | * @return Basket The found data from user session. |
205 | 197 | */ |
206 | - protected function getBasketData() |
|
207 | - { |
|
198 | + protected function getBasketData() { |
|
208 | 199 | // get user session |
209 | 200 | $sessionId = $GLOBALS['TSFE']->fe_user->id; |
210 | 201 | |
@@ -238,8 +229,7 @@ discard block |
||
238 | 229 | * |
239 | 230 | * @return string One basket entry |
240 | 231 | */ |
241 | - protected function getEntry($data) |
|
242 | - { |
|
232 | + protected function getEntry($data) { |
|
243 | 233 | if (is_object($data)) { |
244 | 234 | $data = get_object_vars($data); |
245 | 235 | } |
@@ -291,8 +281,7 @@ discard block |
||
291 | 281 | * |
292 | 282 | * @return mixed download url or false |
293 | 283 | */ |
294 | - protected function getDocumentData($id, $data) |
|
295 | - { |
|
284 | + protected function getDocumentData($id, $data) { |
|
296 | 285 | // get document instance to load further information |
297 | 286 | $this->loadDocument(['id' => $id]); |
298 | 287 | if ($this->document) { |
@@ -360,8 +349,7 @@ discard block |
||
360 | 349 | * |
361 | 350 | * @return array Basket data and JavaScript output |
362 | 351 | */ |
363 | - protected function addToBasket($_piVars, $basket) |
|
364 | - { |
|
352 | + protected function addToBasket($_piVars, $basket) { |
|
365 | 353 | $output = ''; |
366 | 354 | |
367 | 355 | if (!$_piVars['startpage']) { |
@@ -468,8 +456,7 @@ discard block |
||
468 | 456 | * |
469 | 457 | * @return Basket basket |
470 | 458 | */ |
471 | - protected function removeFromBasket($_piVars, $basket) |
|
472 | - { |
|
459 | + protected function removeFromBasket($_piVars, $basket) { |
|
473 | 460 | if (!empty($basket->getDocIds())) { |
474 | 461 | $items = json_decode($basket->getDocIds()); |
475 | 462 | $items = get_object_vars($items); |
@@ -507,8 +494,7 @@ discard block |
||
507 | 494 | * |
508 | 495 | * @return void |
509 | 496 | */ |
510 | - protected function sendMail() |
|
511 | - { |
|
497 | + protected function sendMail() { |
|
512 | 498 | // send mail |
513 | 499 | $mailId = $this->requestData['mail_action']; |
514 | 500 | |
@@ -585,8 +571,7 @@ discard block |
||
585 | 571 | * |
586 | 572 | * @return void |
587 | 573 | */ |
588 | - protected function printDocument($basket) |
|
589 | - { |
|
574 | + protected function printDocument($basket) { |
|
590 | 575 | $pdfUrl = $this->settings['pdfprint']; |
591 | 576 | $numberOfPages = 0; |
592 | 577 | foreach ($this->requestData['selected'] as $docId => $docValue) { |