| @@ -72,7 +72,7 @@ discard block | ||
| 72 | 72 |      { | 
| 73 | 73 |          $this->searchParams = $this->getParametersSafely('searchParameter'); | 
| 74 | 74 | |
| 75 | - $collection = null; | |
| 75 | + $collection = NULL; | |
| 76 | 76 |          if ($this->searchParams['collection'] && MathUtility::canBeInterpretedAsInteger($this->searchParams['collection'])) { | 
| 77 | 77 | $collection = $this->collectionRepository->findByUid($this->searchParams['collection']); | 
| 78 | 78 | } | 
| @@ -83,15 +83,15 @@ discard block | ||
| 83 | 83 | } | 
| 84 | 84 | |
| 85 | 85 | // get all sortable metadata records | 
| 86 | - $sortableMetadata = $this->metadataRepository->findByIsSortable(true); | |
| 86 | + $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE); | |
| 87 | 87 | |
| 88 | 88 | // get all metadata records to be shown in results | 
| 89 | - $listedMetadata = $this->metadataRepository->findByIsListed(true); | |
| 89 | + $listedMetadata = $this->metadataRepository->findByIsListed(TRUE); | |
| 90 | 90 | |
| 91 | 91 | $solrResults = []; | 
| 92 | 92 | $numResults = 0; | 
| 93 | 93 |          if (is_array($this->searchParams) && !empty($this->searchParams)) { | 
| 94 | - $solrResults = $this->documentRepository->findSolrByCollection($collection ? : null, $this->settings, $this->searchParams, $listedMetadata); | |
| 94 | + $solrResults = $this->documentRepository->findSolrByCollection($collection ? : NULL, $this->settings, $this->searchParams, $listedMetadata); | |
| 95 | 95 | $numResults = $solrResults->getNumFound(); | 
| 96 | 96 | } | 
| 97 | 97 | |
| @@ -35,8 +35,8 @@ discard block | ||
| 35 | 35 | // Load current document. | 
| 36 | 36 | $this->loadDocument($this->requestData); | 
| 37 | 37 | if ( | 
| 38 | - $this->document === null | |
| 39 | - || $this->document->getDoc() === null | |
| 38 | + $this->document === NULL | |
| 39 | + || $this->document->getDoc() === NULL | |
| 40 | 40 |          ) { | 
| 41 | 41 | // Quit without doing anything if required variables are not set. | 
| 42 | 42 | return ''; | 
| @@ -81,7 +81,7 @@ discard block | ||
| 81 | 81 | // prepare feature array for fluid | 
| 82 | 82 | $features = []; | 
| 83 | 83 |          foreach (explode(',', $this->settings['features']) as $feature) { | 
| 84 | - $features[$feature] = true; | |
| 84 | + $features[$feature] = TRUE; | |
| 85 | 85 | } | 
| 86 | 86 |          $this->view->assign('features', $features); | 
| 87 | 87 | } | 
| @@ -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 | * | 
| @@ -44,8 +43,7 @@ discard block | ||
| 44 | 43 | * | 
| 45 | 44 | * @return array HMENU array for menu entry | 
| 46 | 45 | */ | 
| 47 | - protected function getMenuEntry(array $entry, $recursive = false) | |
| 48 | -    { | |
| 46 | +    protected function getMenuEntry(array $entry, $recursive = false) { | |
| 49 | 47 | $entry = $this->resolveMenuEntry($entry); | 
| 50 | 48 | |
| 51 | 49 | $entryArray = []; | 
| @@ -139,8 +137,7 @@ discard block | ||
| 139 | 137 | * @param array $entry | 
| 140 | 138 | * @return array | 
| 141 | 139 | */ | 
| 142 | - protected function resolveMenuEntry($entry) | |
| 143 | -    { | |
| 140 | +    protected function resolveMenuEntry($entry) { | |
| 144 | 141 | // If the menu entry points to the parent document, | 
| 145 | 142 | // resolve to the parent UID set on indexation. | 
| 146 | 143 | $doc = $this->document->getDoc(); | 
| @@ -161,8 +158,7 @@ discard block | ||
| 161 | 158 | * | 
| 162 | 159 | * @return void | 
| 163 | 160 | */ | 
| 164 | - public function mainAction() | |
| 165 | -    { | |
| 161 | +    public function mainAction() { | |
| 166 | 162 |          $this->view->assign('toc', $this->makeMenuArray()); | 
| 167 | 163 | } | 
| 168 | 164 | |
| @@ -172,8 +168,7 @@ discard block | ||
| 172 | 168 | * @access public | 
| 173 | 169 | * @return array HMENU array | 
| 174 | 170 | */ | 
| 175 | - public function makeMenuArray() | |
| 176 | -    { | |
| 171 | +    public function makeMenuArray() { | |
| 177 | 172 | // Load current document. | 
| 178 | 173 | $this->loadDocument($this->requestData); | 
| 179 | 174 | if ( | 
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | * | 
| 45 | 45 | * @return array HMENU array for menu entry | 
| 46 | 46 | */ | 
| 47 | - protected function getMenuEntry(array $entry, $recursive = false) | |
| 47 | + protected function getMenuEntry(array $entry, $recursive = FALSE) | |
| 48 | 48 |      { | 
| 49 | 49 | $entry = $this->resolveMenuEntry($entry); | 
| 50 | 50 | |
| @@ -102,7 +102,7 @@ discard block | ||
| 102 | 102 | } | 
| 103 | 103 | // Build sub-menu if available and called recursively. | 
| 104 | 104 | if ( | 
| 105 | - $recursive === true | |
| 105 | + $recursive === TRUE | |
| 106 | 106 | && !empty($entry['children']) | 
| 107 | 107 |          ) { | 
| 108 | 108 | // Build sub-menu only if one of the following conditions apply: | 
| @@ -120,7 +120,7 @@ discard block | ||
| 120 | 120 |                      if (in_array($child['id'], $this->activeEntries)) { | 
| 121 | 121 | $entryArray['ITEM_STATE'] = 'ACT'; | 
| 122 | 122 | } | 
| 123 | - $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true); | |
| 123 | + $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE); | |
| 124 | 124 | } | 
| 125 | 125 | } | 
| 126 | 126 | // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries. | 
| @@ -177,8 +177,8 @@ discard block | ||
| 177 | 177 | // Load current document. | 
| 178 | 178 | $this->loadDocument($this->requestData); | 
| 179 | 179 | if ( | 
| 180 | - $this->document === null | |
| 181 | - || $this->document->getDoc() === null | |
| 180 | + $this->document === NULL | |
| 181 | + || $this->document->getDoc() === NULL | |
| 182 | 182 |          ) { | 
| 183 | 183 | // Quit without doing anything if required variables are not set. | 
| 184 | 184 | return []; | 
| @@ -225,12 +225,12 @@ discard block | ||
| 225 | 225 | } | 
| 226 | 226 | // Go through table of contents and create all menu entries. | 
| 227 | 227 |              foreach ($this->document->getDoc()->tableOfContents as $entry) { | 
| 228 | - $menuArray[] = $this->getMenuEntry($entry, true); | |
| 228 | + $menuArray[] = $this->getMenuEntry($entry, TRUE); | |
| 229 | 229 | } | 
| 230 | 230 |          } else { | 
| 231 | 231 | // Go through table of contents and create top-level menu entries. | 
| 232 | 232 |              foreach ($this->document->getDoc()->tableOfContents as $entry) { | 
| 233 | - $menuArray[] = $this->getMenuEntry($entry, false); | |
| 233 | + $menuArray[] = $this->getMenuEntry($entry, FALSE); | |
| 234 | 234 | } | 
| 235 | 235 | // Build table of contents from database. | 
| 236 | 236 | $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings); | 
| @@ -249,7 +249,7 @@ discard block | ||
| 249 | 249 | 'pagination' => '', | 
| 250 | 250 | 'targetUid' => $resArray['uid'] | 
| 251 | 251 | ]; | 
| 252 | - $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false); | |
| 252 | + $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE); | |
| 253 | 253 | } | 
| 254 | 254 | } | 
| 255 | 255 | } | 
| @@ -146,11 +146,11 @@ discard block | ||
| 146 | 146 | $fulltext['mimetype'] = $this->document->getDoc()->getFileMimeType($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$page]]['files'][$fileGrpFulltext]); | 
| 147 | 147 | break; | 
| 148 | 148 |              } else { | 
| 149 | -                $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrp "' . $fileGrpFulltext . '"'); | |
| 149 | +                $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrp "'.$fileGrpFulltext.'"'); | |
| 150 | 150 | } | 
| 151 | 151 | } | 
| 152 | 152 |          if (empty($fulltext)) { | 
| 153 | -            $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['fileGrpFulltext'] . '"'); | |
| 153 | +            $this->logger->notice('No full-text file found for page "'.$page.'" in fileGrps "'.$this->extConf['fileGrpFulltext'].'"'); | |
| 154 | 154 | } | 
| 155 | 155 | return $fulltext; | 
| 156 | 156 | } | 
| @@ -168,13 +168,13 @@ discard block | ||
| 168 | 168 |          $viewerConfiguration = '$(document).ready(function() { | 
| 169 | 169 |                  if (dlfUtils.exists(dlfViewer)) { | 
| 170 | 170 |                      tx_dlf_viewer = new dlfViewer({ | 
| 171 | -                        controls: ["' . implode('", "', $this->controls) . '"], | |
| 172 | - div: "' . $this->settings['elementId'] . '", | |
| 173 | - progressElementId: "' . $this->settings['progressElementId'] . '", | |
| 174 | - images: ' . json_encode($this->images) . ', | |
| 175 | - fulltexts: ' . json_encode($this->fulltexts) . ', | |
| 176 | - annotationContainers: ' . json_encode($this->annotationContainers) . ', | |
| 177 | - useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . ' | |
| 171 | +                        controls: ["' . implode('", "', $this->controls).'"], | |
| 172 | + div: "' . $this->settings['elementId'].'", | |
| 173 | + progressElementId: "' . $this->settings['progressElementId'].'", | |
| 174 | + images: ' . json_encode($this->images).', | |
| 175 | + fulltexts: ' . json_encode($this->fulltexts).', | |
| 176 | + annotationContainers: ' . json_encode($this->annotationContainers).', | |
| 177 | + useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0).' | |
| 178 | 178 | }); | 
| 179 | 179 | } | 
| 180 | 180 | });'; | 
| @@ -275,11 +275,11 @@ discard block | ||
| 275 | 275 | } | 
| 276 | 276 | break; | 
| 277 | 277 |              } else { | 
| 278 | -                $this->logger->notice('No image file found for page "' . $page . '" in fileGrp "' . $fileGrpImages . '"'); | |
| 278 | +                $this->logger->notice('No image file found for page "'.$page.'" in fileGrp "'.$fileGrpImages.'"'); | |
| 279 | 279 | } | 
| 280 | 280 | } | 
| 281 | 281 |          if (empty($image)) { | 
| 282 | -            $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['fileGrpImages'] . '"'); | |
| 282 | +            $this->logger->warning('No image file found for page "'.$page.'" in fileGrps "'.$this->extConf['fileGrpImages'].'"'); | |
| 283 | 283 | } | 
| 284 | 284 | return $image; | 
| 285 | 285 | } | 
| @@ -148,7 +148,7 @@ discard block | ||
| 148 | 148 |                  $_day = date('j', $dateTimestamp); | 
| 149 | 149 | $calendarIssuesByYear[$_year][$_month][$_day][] = $issue; | 
| 150 | 150 |              } else { | 
| 151 | -                $this->logger->warning('Document with UID ' . $issue['uid'] . 'has no valid date of publication'); | |
| 151 | +                $this->logger->warning('Document with UID '.$issue['uid'].'has no valid date of publication'); | |
| 152 | 152 | } | 
| 153 | 153 | } | 
| 154 | 154 | // Sort by years. | 
| @@ -265,7 +265,7 @@ discard block | ||
| 265 | 265 | protected function getCalendarYear(&$calendarData, $calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) | 
| 266 | 266 |      { | 
| 267 | 267 |          for ($i = $firstMonth; $i <= $lastMonth; $i++) { | 
| 268 | - $key = $year . '-' . $i; | |
| 268 | + $key = $year.'-'.$i; | |
| 269 | 269 | |
| 270 | 270 | $calendarData[$key] = [ | 
| 271 | 271 |                  'DAYMON_NAME' => strftime('%a', strtotime('last Monday')), | 
| @@ -275,16 +275,16 @@ discard block | ||
| 275 | 275 |                  'DAYFRI_NAME' => strftime('%a', strtotime('last Friday')), | 
| 276 | 276 |                  'DAYSAT_NAME' => strftime('%a', strtotime('last Saturday')), | 
| 277 | 277 |                  'DAYSUN_NAME' => strftime('%a', strtotime('last Sunday')), | 
| 278 | -                'MONTHNAME'  => strftime('%B', strtotime($year . '-' . $i . '-1')) . ' ' . $year, | |
| 278 | +                'MONTHNAME'  => strftime('%B', strtotime($year.'-'.$i.'-1')).' '.$year, | |
| 279 | 279 | 'CALYEAR' => ($i == $firstMonth) ? $year : '' | 
| 280 | 280 | ]; | 
| 281 | 281 | |
| 282 | - $firstOfMonth = strtotime($year . '-' . $i . '-1'); | |
| 282 | + $firstOfMonth = strtotime($year.'-'.$i.'-1'); | |
| 283 | 283 |              $lastOfMonth = strtotime('last day of', ($firstOfMonth)); | 
| 284 | 284 |              $firstOfMonthStart = strtotime('last Monday', $firstOfMonth); | 
| 285 | 285 | // There are never more than 6 weeks in a month. | 
| 286 | 286 |              for ($j = 0; $j <= 5; $j++) { | 
| 287 | -                $firstDayOfWeek = strtotime('+ ' . $j . ' Week', $firstOfMonthStart); | |
| 287 | +                $firstDayOfWeek = strtotime('+ '.$j.' Week', $firstOfMonthStart); | |
| 288 | 288 | |
| 289 | 289 | $calendarData[$key]['week'][$j] = [ | 
| 290 | 290 | 'DAYMON' => ['dayValue' => ' '], | 
| @@ -297,7 +297,7 @@ discard block | ||
| 297 | 297 | ]; | 
| 298 | 298 | // Every week has seven days. ;-) | 
| 299 | 299 |                  for ($k = 0; $k <= 6; $k++) { | 
| 300 | -                    $currentDayTime = strtotime('+ ' . $k . ' Day', $firstDayOfWeek); | |
| 300 | +                    $currentDayTime = strtotime('+ '.$k.' Day', $firstDayOfWeek); | |
| 301 | 301 | if ( | 
| 302 | 302 | $currentDayTime >= $firstOfMonth | 
| 303 | 303 | && $currentDayTime <= $lastOfMonth | 
| @@ -328,7 +328,7 @@ discard block | ||
| 328 | 328 | } | 
| 329 | 329 | $dayLinkDiv = $dayLinksText; | 
| 330 | 330 | } | 
| 331 | -                        switch (strftime('%w', strtotime('+ ' . $k . ' Day', $firstDayOfWeek))) { | |
| 331 | +                        switch (strftime('%w', strtotime('+ '.$k.' Day', $firstDayOfWeek))) { | |
| 332 | 332 | case '0': | 
| 333 | 333 |                                  $calendarData[$key]['week'][$j]['DAYSUN']['dayValue'] = strftime('%d', $currentDayTime); | 
| 334 | 334 |                                  if ((int) $dayLinks === (int) date('j', $currentDayTime)) { | 
| @@ -26,8 +26,7 @@ discard block | ||
| 26 | 26 | * @subpackage dlf | 
| 27 | 27 | * @access public | 
| 28 | 28 | */ | 
| 29 | -class CalendarController extends AbstractController | |
| 30 | -{ | |
| 29 | +class CalendarController extends AbstractController { | |
| 31 | 30 | /** | 
| 32 | 31 | * @var StructureRepository | 
| 33 | 32 | */ | 
| @@ -36,8 +35,7 @@ discard block | ||
| 36 | 35 | /** | 
| 37 | 36 | * @param StructureRepository $structureRepository | 
| 38 | 37 | */ | 
| 39 | - public function injectStructureRepository(StructureRepository $structureRepository) | |
| 40 | -    { | |
| 38 | +    public function injectStructureRepository(StructureRepository $structureRepository) { | |
| 41 | 39 | $this->structureRepository = $structureRepository; | 
| 42 | 40 | } | 
| 43 | 41 | |
| @@ -54,8 +52,7 @@ discard block | ||
| 54 | 52 | * | 
| 55 | 53 | * @return void | 
| 56 | 54 | */ | 
| 57 | - public function mainAction() | |
| 58 | -    { | |
| 55 | +    public function mainAction() { | |
| 59 | 56 | // Set initial document (anchor or year file) if configured. | 
| 60 | 57 |          if (empty($this->requestData['id']) && !empty($this->settings['initialDocument'])) { | 
| 61 | 58 | $this->requestData['id'] = $this->settings['initialDocument']; | 
| @@ -100,8 +97,7 @@ discard block | ||
| 100 | 97 | * | 
| 101 | 98 | * @return void | 
| 102 | 99 | */ | 
| 103 | - public function calendarAction() | |
| 104 | -    { | |
| 100 | +    public function calendarAction() { | |
| 105 | 101 | // access arguments passed by the mainAction() | 
| 106 | 102 | $mainrequestData = $this->request->getArguments(); | 
| 107 | 103 | |
| @@ -206,8 +202,7 @@ discard block | ||
| 206 | 202 | * | 
| 207 | 203 | * @return void | 
| 208 | 204 | */ | 
| 209 | - public function yearsAction() | |
| 210 | -    { | |
| 205 | +    public function yearsAction() { | |
| 211 | 206 | // access arguments passed by the mainAction() | 
| 212 | 207 | $mainrequestData = $this->request->getArguments(); | 
| 213 | 208 | |
| @@ -262,8 +257,7 @@ discard block | ||
| 262 | 257 | * | 
| 263 | 258 | * @return string Content for template subpart | 
| 264 | 259 | */ | 
| 265 | - protected function getCalendarYear(&$calendarData, $calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) | |
| 266 | -    { | |
| 260 | +    protected function getCalendarYear(&$calendarData, $calendarIssuesByMonth, $year, $firstMonth = 1, $lastMonth = 12) { | |
| 267 | 261 |          for ($i = $firstMonth; $i <= $lastMonth; $i++) { | 
| 268 | 262 | $key = $year . '-' . $i; | 
| 269 | 263 | |
| @@ -63,7 +63,7 @@ discard block | ||
| 63 | 63 | |
| 64 | 64 | // Load current document. | 
| 65 | 65 | $this->loadDocument($this->requestData); | 
| 66 | -        if ($this->document === null) { | |
| 66 | +        if ($this->document === NULL) { | |
| 67 | 67 | // Quit without doing anything if required variables are not set. | 
| 68 | 68 | return ''; | 
| 69 | 69 | } | 
| @@ -78,10 +78,10 @@ discard block | ||
| 78 | 78 |          switch ($type) { | 
| 79 | 79 | case 'newspaper': | 
| 80 | 80 | case 'ephemera': | 
| 81 | -                $this->forward('years', null, null, $this->requestData); | |
| 81 | +                $this->forward('years', NULL, NULL, $this->requestData); | |
| 82 | 82 | break; | 
| 83 | 83 | case 'year': | 
| 84 | -                $this->forward('calendar', null, null, $this->requestData); | |
| 84 | +                $this->forward('calendar', NULL, NULL, $this->requestData); | |
| 85 | 85 | break; | 
| 86 | 86 | case 'issue': | 
| 87 | 87 | default: | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | |
| 111 | 111 | // Load current document. | 
| 112 | 112 | $this->loadDocument($this->requestData); | 
| 113 | -        if ($this->document === null) { | |
| 113 | +        if ($this->document === NULL) { | |
| 114 | 114 | // Quit without doing anything if required variables are not set. | 
| 115 | 115 | return ''; | 
| 116 | 116 | } | 
| @@ -127,7 +127,7 @@ discard block | ||
| 127 | 127 | $title = $document->getTitle(); | 
| 128 | 128 |              } else { | 
| 129 | 129 | $title = !empty($document->getMetsLabel()) ? $document->getMetsLabel() : $document->getMetsOrderlabel(); | 
| 130 | -                if (strtotime($title) !== false) { | |
| 130 | +                if (strtotime($title) !== FALSE) { | |
| 131 | 131 |                      $title = strftime('%x', strtotime($title)); | 
| 132 | 132 | } | 
| 133 | 133 | } | 
| @@ -142,7 +142,7 @@ discard block | ||
| 142 | 142 | $calendarIssuesByYear = []; | 
| 143 | 143 |          foreach ($issues as $issue) { | 
| 144 | 144 | $dateTimestamp = strtotime($issue['year']); | 
| 145 | -            if ($dateTimestamp !== false) { | |
| 145 | +            if ($dateTimestamp !== FALSE) { | |
| 146 | 146 |                  $_year = date('Y', $dateTimestamp); | 
| 147 | 147 |                  $_month = date('n', $dateTimestamp); | 
| 148 | 148 |                  $_day = date('j', $dateTimestamp); | 
| @@ -216,7 +216,7 @@ discard block | ||
| 216 | 216 | |
| 217 | 217 | // Load current document. | 
| 218 | 218 | $this->loadDocument($this->requestData); | 
| 219 | -        if ($this->document === null) { | |
| 219 | +        if ($this->document === NULL) { | |
| 220 | 220 | // Quit without doing anything if required variables are not set. | 
| 221 | 221 | return ''; | 
| 222 | 222 | } | 
| @@ -87,7 +87,7 @@ discard block | ||
| 87 | 87 | } | 
| 88 | 88 | |
| 89 | 89 |          if (count($collections) == 1 && empty($this->settings['dont_show_single']) && is_array($collections)) { | 
| 90 | -            $this->forward('show', null, null, ['collection' => array_pop($collections)]); | |
| 90 | +            $this->forward('show', NULL, NULL, ['collection' => array_pop($collections)]); | |
| 91 | 91 | } | 
| 92 | 92 | |
| 93 | 93 | $processedCollections = []; | 
| @@ -166,7 +166,7 @@ discard block | ||
| 166 | 166 | $searchParams['collection'] = $collection; | 
| 167 | 167 | // If a targetPid is given, the results will be shown by ListView on the target page. | 
| 168 | 168 |          if (!empty($this->settings['targetPid'])) { | 
| 169 | -            $this->redirect('main', 'ListView', null, | |
| 169 | +            $this->redirect('main', 'ListView', NULL, | |
| 170 | 170 | [ | 
| 171 | 171 | 'searchParameter' => $searchParams, | 
| 172 | 172 | 'widgetPage' => $widgetPage | 
| @@ -175,10 +175,10 @@ discard block | ||
| 175 | 175 | } | 
| 176 | 176 | |
| 177 | 177 | // get all metadata records to be shown in results | 
| 178 | - $listedMetadata = $this->metadataRepository->findByIsListed(true); | |
| 178 | + $listedMetadata = $this->metadataRepository->findByIsListed(TRUE); | |
| 179 | 179 | |
| 180 | 180 | // get all sortable metadata records | 
| 181 | - $sortableMetadata = $this->metadataRepository->findByIsSortable(true); | |
| 181 | + $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE); | |
| 182 | 182 | |
| 183 | 183 | // get all documents of given collection | 
| 184 | 184 | $solrResults = $this->documentRepository->findSolrByCollection($collection, $this->settings, $searchParams, $listedMetadata); | 
| @@ -204,13 +204,13 @@ discard block | ||
| 204 | 204 | // if search was triggered, get search parameters from POST variables | 
| 205 | 205 |          $searchParams = $this->getParametersSafely('searchParameter'); | 
| 206 | 206 | |
| 207 | - $collection = null; | |
| 207 | + $collection = NULL; | |
| 208 | 208 |          if ($searchParams['collection']['__identity'] && MathUtility::canBeInterpretedAsInteger($searchParams['collection']['__identity'])) { | 
| 209 | 209 | $collection = $this->collectionRepository->findByUid($searchParams['collection']['__identity']); | 
| 210 | 210 | } | 
| 211 | 211 | |
| 212 | 212 | // output is done by show action | 
| 213 | -        $this->forward('show', null, null, ['searchParameter' => $searchParams, 'collection' => $collection]); | |
| 213 | +        $this->forward('show', NULL, NULL, ['searchParameter' => $searchParams, 'collection' => $collection]); | |
| 214 | 214 | |
| 215 | 215 | } | 
| 216 | 216 | } | 
| @@ -21,13 +21,11 @@ | ||
| 21 | 21 | * @subpackage dlf | 
| 22 | 22 | * @access public | 
| 23 | 23 | */ | 
| 24 | -class View3DController extends AbstractController | |
| 25 | -{ | |
| 24 | +class View3DController extends AbstractController { | |
| 26 | 25 | /** | 
| 27 | 26 | * @return string|void | 
| 28 | 27 | */ | 
| 29 | - public function mainAction() | |
| 30 | -    { | |
| 28 | +    public function mainAction() { | |
| 31 | 29 | $this->cObj = $this->configurationManager->getContentObject(); | 
| 32 | 30 | // Load current document. | 
| 33 | 31 | $this->loadDocument($this->requestData); | 
| @@ -32,8 +32,8 @@ | ||
| 32 | 32 | // Load current document. | 
| 33 | 33 | $this->loadDocument($this->requestData); | 
| 34 | 34 | if ( | 
| 35 | - $this->document === null | |
| 36 | - || $this->document->getDoc() === null | |
| 35 | + $this->document === NULL | |
| 36 | + || $this->document->getDoc() === NULL | |
| 37 | 37 | || $this->document->getDoc()->metadataArray['LOG_0001']['type'][0] != 'object' | 
| 38 | 38 |          ) { | 
| 39 | 39 | // Quit without doing anything if required variables are not set. | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 |          $this->searchParams = $this->getParametersSafely('searchParameter'); | 
| 78 | 78 | |
| 79 | 79 | // output is done by main action | 
| 80 | -        $this->forward('main', null, null, ['searchParameter' => $this->searchParams]); | |
| 80 | +        $this->forward('main', NULL, NULL, ['searchParameter' => $this->searchParams]); | |
| 81 | 81 | } | 
| 82 | 82 | |
| 83 | 83 | /** | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | */ | 
| 90 | 90 | public function mainAction() | 
| 91 | 91 |      { | 
| 92 | - $listViewSearch = false; | |
| 92 | + $listViewSearch = FALSE; | |
| 93 | 93 | // Quit without doing anything if required variables are not set. | 
| 94 | 94 |          if (empty($this->settings['solrcore'])) { | 
| 95 | 95 |              $this->logger->warning('Incomplete plugin configuration'); | 
| @@ -103,7 +103,7 @@ discard block | ||
| 103 | 103 | |
| 104 | 104 |          if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) { | 
| 105 | 105 | $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']); | 
| 106 | - $listViewSearch = true; | |
| 106 | + $listViewSearch = TRUE; | |
| 107 | 107 | } | 
| 108 | 108 | |
| 109 | 109 | // Pagination of Results: Pass the currentPage to the fluid template to calculate current index of search result. | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | |
| 115 | 115 | // If a targetPid is given, the results will be shown by ListView on the target page. | 
| 116 | 116 |          if (!empty($this->settings['targetPid']) && !empty($this->searchParams) && !$listViewSearch) { | 
| 117 | -            $this->redirect('main', 'ListView', null, | |
| 117 | +            $this->redirect('main', 'ListView', NULL, | |
| 118 | 118 | [ | 
| 119 | 119 | 'searchParameter' => $this->searchParams, | 
| 120 | 120 | 'widgetPage' => $widgetPage | 
| @@ -125,16 +125,16 @@ discard block | ||
| 125 | 125 | // If no search has been executed, no variables habe to be prepared. An empty form will be shown. | 
| 126 | 126 |          if (is_array($this->searchParams) && !empty($this->searchParams)) { | 
| 127 | 127 | // get all sortable metadata records | 
| 128 | - $sortableMetadata = $this->metadataRepository->findByIsSortable(true); | |
| 128 | + $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE); | |
| 129 | 129 | |
| 130 | 130 | // get all metadata records to be shown in results | 
| 131 | - $listedMetadata = $this->metadataRepository->findByIsListed(true); | |
| 131 | + $listedMetadata = $this->metadataRepository->findByIsListed(TRUE); | |
| 132 | 132 | |
| 133 | 133 | $solrResults = []; | 
| 134 | 134 | $numResults = 0; | 
| 135 | 135 | // Do not execute the Solr search if used together with ListView plugin. | 
| 136 | 136 |              if (!$listViewSearch) { | 
| 137 | - $solrResults = $this->documentRepository->findSolrByCollection(null, $this->settings, $this->searchParams, $listedMetadata); | |
| 137 | + $solrResults = $this->documentRepository->findSolrByCollection(NULL, $this->settings, $this->searchParams, $listedMetadata); | |
| 138 | 138 | $numResults = $solrResults->getNumFound(); | 
| 139 | 139 | } | 
| 140 | 140 | |
| @@ -183,7 +183,7 @@ discard block | ||
| 183 | 183 | |
| 184 | 184 | // Get facets from plugin configuration. | 
| 185 | 185 | $facets = []; | 
| 186 | -        foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) { | |
| 186 | +        foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], TRUE) as $facet) { | |
| 187 | 187 | $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']); | 
| 188 | 188 | } | 
| 189 | 189 | |
| @@ -384,7 +384,7 @@ discard block | ||
| 384 | 384 | // Check if facet is already selected. | 
| 385 | 385 | $queryColumn = array_column($search['params']['filterquery'], 'query'); | 
| 386 | 386 |          $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn); | 
| 387 | -        if ($index !== false) { | |
| 387 | +        if ($index !== FALSE) { | |
| 388 | 388 | // Facet is selected, thus remove it from filter. | 
| 389 | 389 | unset($queryColumn[$index]); | 
| 390 | 390 | $queryColumn = array_values($queryColumn); | 
| @@ -392,7 +392,7 @@ discard block | ||
| 392 | 392 | $state = 'ACTIFSUB'; | 
| 393 | 393 | // Reset facets | 
| 394 | 394 |              if ($this->settings['resetFacets']) { | 
| 395 | - $entryArray['resetFacet'] = true; | |
| 395 | + $entryArray['resetFacet'] = TRUE; | |
| 396 | 396 | $entryArray['queryColumn'] = $queryColumn; | 
| 397 | 397 | } | 
| 398 | 398 |          } else { | 
| @@ -423,7 +423,7 @@ discard block | ||
| 423 | 423 | } | 
| 424 | 424 | |
| 425 | 425 | // Get field selector options. | 
| 426 | -        $searchFields = GeneralUtility::trimExplode(',', $this->settings['extendedFields'], true); | |
| 426 | +        $searchFields = GeneralUtility::trimExplode(',', $this->settings['extendedFields'], TRUE); | |
| 427 | 427 | |
| 428 | 428 | $slotCountArray = []; | 
| 429 | 429 |          for ($i = 0; $i < $this->settings['extendedSlotCount']; $i++) { | 
| @@ -48,6 +48,6 @@ | ||
| 48 | 48 | $metadata['video_duration'] = [$videoDuration]; | 
| 49 | 49 | } | 
| 50 | 50 | |
| 51 | - $metadata['duration'] = $metadata['video_duration'] ?: $metadata['audio_duration'] ?: []; | |
| 51 | + $metadata['duration'] = $metadata['video_duration'] ? : $metadata['audio_duration'] ? : []; | |
| 52 | 52 | } | 
| 53 | 53 | } | 
| @@ -35,8 +35,7 @@ | ||
| 35 | 35 | * | 
| 36 | 36 | * @return void | 
| 37 | 37 | */ | 
| 38 | - public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) | |
| 39 | -    { | |
| 38 | +    public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) { | |
| 40 | 39 |          $xml->registerXPathNamespace('audiomd', 'http://www.loc.gov/audioMD/'); | 
| 41 | 40 |          $xml->registerXPathNamespace('videomd', 'http://www.loc.gov/videoMD/'); | 
| 42 | 41 | |