@@ -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 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->filterParams = $this->getParametersSafely('filterParameter'); |
52 | 52 | |
53 | 53 | // output is done by main action |
54 | - $this->forward('main', null, null, ['filterParameter' => $this->filterParams]); |
|
54 | + $this->forward('main', NULL, NULL, ['filterParameter' => $this->filterParams]); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | // Load current document. |
65 | 65 | $this->loadDocument($this->requestData); |
66 | 66 | if ( |
67 | - $this->document === null |
|
68 | - || $this->document->getDoc() === null |
|
67 | + $this->document === NULL |
|
68 | + || $this->document->getDoc() === NULL |
|
69 | 69 | ) { |
70 | 70 | // Quit without doing anything if required variables are not set. |
71 | 71 | return; |
@@ -127,12 +127,12 @@ discard block |
||
127 | 127 | } |
128 | 128 | // Go through table of contents and create all menu entries. |
129 | 129 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
130 | - $menuArray[] = $this->getMenuEntry($entry, true); |
|
130 | + $menuArray[] = $this->getMenuEntry($entry, TRUE); |
|
131 | 131 | } |
132 | 132 | } else { |
133 | 133 | // Go through table of contents and create top-level menu entries. |
134 | 134 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
135 | - $menuArray[] = $this->getMenuEntry($entry, false); |
|
135 | + $menuArray[] = $this->getMenuEntry($entry, FALSE); |
|
136 | 136 | } |
137 | 137 | // Build table of contents from database. |
138 | 138 | $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'pagination' => '', |
152 | 152 | 'targetUid' => $resArray['uid'] |
153 | 153 | ]; |
154 | - $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false); |
|
154 | + $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE); |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | // Go through table of contents and create all menu entries. |
176 | 176 | foreach ($this->document->getDoc()->tableOfContents as $entry) { |
177 | - $menuEntry = $this->getMenuEntryWithImage($entry, true); |
|
177 | + $menuEntry = $this->getMenuEntryWithImage($entry, TRUE); |
|
178 | 178 | if (!empty($menuEntry)) { |
179 | 179 | $menuArray[] = $menuEntry; |
180 | 180 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * |
193 | 193 | * @return array HMENU array for menu entry |
194 | 194 | */ |
195 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
195 | + protected function getMenuEntry(array $entry, $recursive = FALSE) |
|
196 | 196 | { |
197 | 197 | $entry = $this->resolveMenuEntry($entry); |
198 | 198 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | } |
251 | 251 | // Build sub-menu if available and called recursively. |
252 | 252 | if ( |
253 | - $recursive === true |
|
253 | + $recursive === TRUE |
|
254 | 254 | && !empty($entry['children']) |
255 | 255 | ) { |
256 | 256 | // Build sub-menu only if one of the following conditions apply: |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | if (in_array($child['id'], $this->activeEntries)) { |
269 | 269 | $entryArray['ITEM_STATE'] = 'ACT'; |
270 | 270 | } |
271 | - $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true); |
|
271 | + $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE); |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | return $entry; |
305 | 305 | } |
306 | 306 | |
307 | - protected function getMenuEntryWithImage(array $entry, $recursive = false) |
|
307 | + protected function getMenuEntryWithImage(array $entry, $recursive = FALSE) |
|
308 | 308 | { |
309 | 309 | $entryArray = []; |
310 | 310 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | $entryArray['doNotLinkIt'] = 1; |
326 | 326 | $entryArray['ITEM_STATE'] = 'HEADER'; |
327 | 327 | |
328 | - if ($entry['children'] === null) { |
|
328 | + if ($entry['children'] === NULL) { |
|
329 | 329 | $entryArray['description'] = $entry['description']; |
330 | 330 | $id = $this->document->getDoc()->smLinks['l2p'][$entry['id']][0]; |
331 | 331 | $entryArray['image'] = $this->document->getDoc()->getFileLocation($this->document->getDoc()->physicalStructureInfo[$id]['files']['THUMBS']); |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | |
339 | 339 | // Build sub-menu if available and called recursively. |
340 | 340 | if ( |
341 | - $recursive == true |
|
341 | + $recursive == TRUE |
|
342 | 342 | && !empty($entry['children']) |
343 | 343 | ) { |
344 | 344 | // Build sub-menu only if one of the following conditions apply: |