@@ -21,8 +21,7 @@ |
||
21 | 21 | * @access public |
22 | 22 | * @abstract |
23 | 23 | */ |
24 | -interface MetadataInterface |
|
25 | -{ |
|
24 | +interface MetadataInterface { |
|
26 | 25 | /** |
27 | 26 | * This extracts metadata from XML |
28 | 27 | * |
@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | * @subpackage dlf |
26 | 26 | * @access public |
27 | 27 | */ |
28 | -class IiifUrlReader implements UrlReaderInterface |
|
29 | -{ |
|
28 | +class IiifUrlReader implements UrlReaderInterface { |
|
30 | 29 | /** |
31 | 30 | * Singleton instance of the class |
32 | 31 | * |
@@ -40,8 +39,7 @@ discard block |
||
40 | 39 | * {@inheritDoc} |
41 | 40 | * @see \Ubl\Iiif\Tools\UrlReaderInterface::getContent() |
42 | 41 | */ |
43 | - public function getContent($url) |
|
44 | - { |
|
42 | + public function getContent($url) { |
|
45 | 43 | $fileContents = GeneralUtility::getUrl($url); |
46 | 44 | if ($fileContents !== false) { |
47 | 45 | return $fileContents; |
@@ -57,8 +55,7 @@ discard block |
||
57 | 55 | * |
58 | 56 | * @return IiifUrlReader |
59 | 57 | */ |
60 | - public static function getInstance() |
|
61 | - { |
|
58 | + public static function getInstance() { |
|
62 | 59 | if (!isset(self::$instance)) { |
63 | 60 | self::$instance = new IiifUrlReader(); |
64 | 61 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | public function getContent($url) |
44 | 44 | { |
45 | 45 | $fileContents = GeneralUtility::getUrl($url); |
46 | - if ($fileContents !== false) { |
|
46 | + if ($fileContents !== FALSE) { |
|
47 | 47 | return $fileContents; |
48 | 48 | } else { |
49 | 49 | return ''; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function getClass(FlashMessage $flashMessage): string |
67 | 67 | { |
68 | - return 'alert-' . self::$classes[$flashMessage->getSeverity()]; |
|
68 | + return 'alert-'.self::$classes[$flashMessage->getSeverity()]; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -95,19 +95,19 @@ discard block |
||
95 | 95 | $markup[] = '<div class="typo3-messages">'; |
96 | 96 | foreach ($flashMessages as $flashMessage) { |
97 | 97 | $messageTitle = $flashMessage->getTitle(); |
98 | - $markup[] = '<div class="alert ' . htmlspecialchars($this->getClass($flashMessage)) . '">'; |
|
98 | + $markup[] = '<div class="alert '.htmlspecialchars($this->getClass($flashMessage)).'">'; |
|
99 | 99 | $markup[] = ' <div class="media">'; |
100 | 100 | $markup[] = ' <div class="media-left">'; |
101 | 101 | $markup[] = ' <span class="fa-stack fa-lg">'; |
102 | 102 | $markup[] = ' <i class="fa fa-circle fa-stack-2x"></i>'; |
103 | - $markup[] = ' <i class="fa fa-' . htmlspecialchars($this->getIconName($flashMessage)) . ' fa-stack-1x"></i>'; |
|
103 | + $markup[] = ' <i class="fa fa-'.htmlspecialchars($this->getIconName($flashMessage)).' fa-stack-1x"></i>'; |
|
104 | 104 | $markup[] = ' </span>'; |
105 | 105 | $markup[] = ' </div>'; |
106 | 106 | $markup[] = ' <div class="media-body">'; |
107 | 107 | if ($messageTitle !== '') { |
108 | - $markup[] = ' <h4 class="alert-title">' . htmlspecialchars($messageTitle) . '</h4>'; |
|
108 | + $markup[] = ' <h4 class="alert-title">'.htmlspecialchars($messageTitle).'</h4>'; |
|
109 | 109 | } |
110 | - $markup[] = ' <p class="alert-message">' . $flashMessage->getMessage() . '</p>'; |
|
110 | + $markup[] = ' <p class="alert-message">'.$flashMessage->getMessage().'</p>'; |
|
111 | 111 | $markup[] = ' </div>'; |
112 | 112 | $markup[] = ' </div>'; |
113 | 113 | $markup[] = '</div>'; |
@@ -21,8 +21,7 @@ |
||
21 | 21 | * The created output contains all classes which are required for |
22 | 22 | * the TYPO3 backend. Any kind of message contains also a nice icon. |
23 | 23 | */ |
24 | -class KitodoFlashMessageRenderer implements \TYPO3\CMS\Core\Messaging\Renderer\FlashMessageRendererInterface |
|
25 | -{ |
|
24 | +class KitodoFlashMessageRenderer implements \TYPO3\CMS\Core\Messaging\Renderer\FlashMessageRendererInterface { |
|
26 | 25 | /** |
27 | 26 | * @var string The message severity class names |
28 | 27 | */ |
@@ -23,8 +23,7 @@ |
||
23 | 23 | * @subpackage dlf |
24 | 24 | * @access public |
25 | 25 | */ |
26 | -class ext_update |
|
27 | -{ |
|
26 | +class ext_update { |
|
28 | 27 | /** |
29 | 28 | * This holds the output ready to return |
30 | 29 | * |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | public function access(): bool |
44 | 44 | { |
45 | 45 | if (count($this->getMetadataConfig())) { |
46 | - return true; |
|
46 | + return TRUE; |
|
47 | 47 | } |
48 | 48 | if ($this->oldIndexRelatedTableNames()) { |
49 | - return true; |
|
49 | + return TRUE; |
|
50 | 50 | } |
51 | 51 | if ($this->solariumSolrUpdateRequired()) { |
52 | - return true; |
|
52 | + return TRUE; |
|
53 | 53 | } |
54 | 54 | if (count($this->oldFormatClasses())) { |
55 | - return true; |
|
55 | + return TRUE; |
|
56 | 56 | } |
57 | 57 | if ($this->hasNoFormatForDocument()) { |
58 | - return true; |
|
58 | + return TRUE; |
|
59 | 59 | } |
60 | - return false; |
|
60 | + return FALSE; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | // Instantiate search object. |
143 | 143 | $solr = Solr::getInstance($resArray['index_name']); |
144 | 144 | if (!$solr->ready) { |
145 | - return true; |
|
145 | + return TRUE; |
|
146 | 146 | } |
147 | 147 | } |
148 | - return false; |
|
148 | + return FALSE; |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | || $resArray['column_name'] === 'boost' |
202 | 202 | || $resArray['column_name'] === 'autocomplete' |
203 | 203 | ) { |
204 | - return true; |
|
204 | + return TRUE; |
|
205 | 205 | } |
206 | 206 | } |
207 | - return false; |
|
207 | + return FALSE; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * @param bool $checkStructureOnly |
215 | 215 | * @return bool |
216 | 216 | */ |
217 | - protected function hasNoFormatForDocument($checkStructureOnly = false): bool |
|
217 | + protected function hasNoFormatForDocument($checkStructureOnly = FALSE): bool |
|
218 | 218 | { |
219 | 219 | // Check if column "document_format" exists. |
220 | 220 | $database = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname']; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | while ($resArray = $result->fetch()) { |
230 | 230 | if ($resArray['COLUMN_NAME'] === 'document_format') { |
231 | 231 | if ($checkStructureOnly) { |
232 | - return false; |
|
232 | + return FALSE; |
|
233 | 233 | } |
234 | 234 | // Check if column has empty fields. |
235 | 235 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('INFORMATION_SCHEMA.COLUMNS'); |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | ->fetchColumn(0); |
242 | 242 | |
243 | 243 | if ($count === 0) { |
244 | - return false; |
|
244 | + return FALSE; |
|
245 | 245 | } |
246 | 246 | } |
247 | 247 | } |
248 | - return true; |
|
248 | + return TRUE; |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | /** |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | */ |
396 | 396 | protected function doSolariumSolrUpdate(): void |
397 | 397 | { |
398 | - $error = false; |
|
398 | + $error = FALSE; |
|
399 | 399 | // Get all Solr cores that were not deleted. |
400 | 400 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_dlf_solrcores'); |
401 | 401 | $result = $queryBuilder |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR |
413 | 413 | ); |
414 | 414 | $this->content .= Helper::renderFlashMessages(); |
415 | - $error = true; |
|
415 | + $error = TRUE; |
|
416 | 416 | } |
417 | 417 | } |
418 | 418 | if (!$error) { |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | ->update('tx_dlf_documents') |
440 | 440 | ->where( |
441 | 441 | $queryBuilder->expr()->orX( |
442 | - $queryBuilder->expr()->eq('document_format', $queryBuilder->createNamedParameter(null)), |
|
442 | + $queryBuilder->expr()->eq('document_format', $queryBuilder->createNamedParameter(NULL)), |
|
443 | 443 | $queryBuilder->expr()->eq('document_format', $queryBuilder->createNamedParameter('')) |
444 | 444 | ) |
445 | 445 | ) |
@@ -224,7 +224,7 @@ |
||
224 | 224 | $result = $queryBuilder |
225 | 225 | ->select('COLUMN_NAME') |
226 | 226 | ->from('INFORMATION_SCHEMA.COLUMNS') |
227 | - ->where('TABLE_NAME="tx_dlf_documents" AND TABLE_SCHEMA="' . $database . '" AND COLUMN_NAME="document_format"') |
|
227 | + ->where('TABLE_NAME="tx_dlf_documents" AND TABLE_SCHEMA="'.$database.'" AND COLUMN_NAME="document_format"') |
|
228 | 228 | ->execute(); |
229 | 229 | while ($resArray = $result->fetch()) { |
230 | 230 | if ($resArray['COLUMN_NAME'] === 'document_format') { |
@@ -24,8 +24,8 @@ |
||
24 | 24 | 'suggests' => [] |
25 | 25 | ], |
26 | 26 | 'state' => 'stable', |
27 | - 'uploadfolder' => false, |
|
28 | - 'clearCacheOnLoad' => false, |
|
27 | + 'uploadfolder' => FALSE, |
|
28 | + 'clearCacheOnLoad' => FALSE, |
|
29 | 29 | 'author' => 'Sebastian Meyer (Maintainer)', |
30 | 30 | 'author_email' => '[email protected]', |
31 | 31 | 'author_company' => 'Kitodo. Key to digital objects e. V.', |
@@ -69,18 +69,18 @@ discard block |
||
69 | 69 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
70 | 70 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'] |
71 | 71 | ]; |
72 | - $output = '<form action="' . $this->cObj->typoLink_URL($linkConf) . '" method="get"><div><input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />'; |
|
72 | + $output = '<form action="'.$this->cObj->typoLink_URL($linkConf).'" method="get"><div><input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />'; |
|
73 | 73 | // Add plugin variables. |
74 | 74 | foreach ($this->piVars as $piVar => $value) { |
75 | 75 | if ($piVar != 'page' && $piVar != 'DATA' && !empty($value)) { |
76 | - $output .= '<input type="hidden" name="' . $this->prefixId . '[' . preg_replace('/[^A-Za-z0-9_-]/', '', $piVar) . ']" value="' . htmlspecialchars($value) . '" />'; |
|
76 | + $output .= '<input type="hidden" name="'.$this->prefixId.'['.preg_replace('/[^A-Za-z0-9_-]/', '', $piVar).']" value="'.htmlspecialchars($value).'" />'; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | // Add page selector. |
80 | - $uniqId = uniqid(Helper::getUnqualifiedClassName(get_class($this)) . '-'); |
|
81 | - $output .= '<label for="' . $uniqId . '">' . htmlspecialchars($this->pi_getLL('selectPage', '')) . '</label><select id="' . $uniqId . '" name="' . $this->prefixId . '[page]" onchange="javascript:this.form.submit();"' . ($this->doc->numPages < 1 ? ' disabled="disabled"' : '') . '>'; |
|
80 | + $uniqId = uniqid(Helper::getUnqualifiedClassName(get_class($this)).'-'); |
|
81 | + $output .= '<label for="'.$uniqId.'">'.htmlspecialchars($this->pi_getLL('selectPage', '')).'</label><select id="'.$uniqId.'" name="'.$this->prefixId.'[page]" onchange="javascript:this.form.submit();"'.($this->doc->numPages < 1 ? ' disabled="disabled"' : '').'>'; |
|
82 | 82 | for ($i = 1; $i <= $this->doc->numPages; $i++) { |
83 | - $output .= '<option value="' . $i . '"' . ($this->piVars['page'] == $i ? ' selected="selected"' : '') . '>[' . $i . ']' . ($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '') . '</option>'; |
|
83 | + $output .= '<option value="'.$i.'"'.($this->piVars['page'] == $i ? ' selected="selected"' : '').'>['.$i.']'.($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$i]]['orderlabel']) : '').'</option>'; |
|
84 | 84 | } |
85 | 85 | $output .= '</select></div></form>'; |
86 | 86 | return $output; |
@@ -138,53 +138,53 @@ discard block |
||
138 | 138 | if ($this->piVars['page'] > 1) { |
139 | 139 | $markerArray['###FIRST###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('firstPage', '')), ['page' => 1]); |
140 | 140 | } else { |
141 | - $markerArray['###FIRST###'] = '<span title="' . htmlspecialchars($this->pi_getLL('firstPage', '')) . '">' . htmlspecialchars($this->pi_getLL('firstPage', '')) . '</span>'; |
|
141 | + $markerArray['###FIRST###'] = '<span title="'.htmlspecialchars($this->pi_getLL('firstPage', '')).'">'.htmlspecialchars($this->pi_getLL('firstPage', '')).'</span>'; |
|
142 | 142 | } |
143 | 143 | // Link back X pages. |
144 | 144 | if ($this->piVars['page'] > $pageSteps) { |
145 | 145 | $markerArray['###BACK###'] = $this->makeLink(htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)), ['page' => $this->piVars['page'] - $pageSteps]); |
146 | 146 | } else { |
147 | - $markerArray['###BACK###'] = '<span title="' . htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)) . '">' . htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)) . '</span>'; |
|
147 | + $markerArray['###BACK###'] = '<span title="'.htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)).'">'.htmlspecialchars(sprintf($this->pi_getLL('backXPages', ''), $pageSteps)).'</span>'; |
|
148 | 148 | } |
149 | 149 | // Link to previous page. |
150 | 150 | if ($this->piVars['page'] > (1 + $this->piVars['double'])) { |
151 | 151 | $markerArray['###PREVIOUS###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('prevPage', '')), ['page' => $this->piVars['page'] - (1 + $this->piVars['double'])]); |
152 | 152 | } else { |
153 | - $markerArray['###PREVIOUS###'] = '<span title="' . htmlspecialchars($this->pi_getLL('prevPage', '')) . '">' . htmlspecialchars($this->pi_getLL('prevPage', '')) . '</span>'; |
|
153 | + $markerArray['###PREVIOUS###'] = '<span title="'.htmlspecialchars($this->pi_getLL('prevPage', '')).'">'.htmlspecialchars($this->pi_getLL('prevPage', '')).'</span>'; |
|
154 | 154 | } |
155 | 155 | // Link to next page. |
156 | 156 | if ($this->piVars['page'] < ($this->doc->numPages - $this->piVars['double'])) { |
157 | 157 | $markerArray['###NEXT###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('nextPage', '')), ['page' => $this->piVars['page'] + (1 + $this->piVars['double'])]); |
158 | 158 | } else { |
159 | - $markerArray['###NEXT###'] = '<span title="' . htmlspecialchars($this->pi_getLL('nextPage', '')) . '">' . htmlspecialchars($this->pi_getLL('nextPage', '')) . '</span>'; |
|
159 | + $markerArray['###NEXT###'] = '<span title="'.htmlspecialchars($this->pi_getLL('nextPage', '')).'">'.htmlspecialchars($this->pi_getLL('nextPage', '')).'</span>'; |
|
160 | 160 | } |
161 | 161 | // Link forward X pages. |
162 | 162 | if ($this->piVars['page'] <= ($this->doc->numPages - $pageSteps)) { |
163 | 163 | $markerArray['###FORWARD###'] = $this->makeLink(htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)), ['page' => $this->piVars['page'] + $pageSteps]); |
164 | 164 | } else { |
165 | - $markerArray['###FORWARD###'] = '<span title="' . htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)) . '">' . htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)) . '</span>'; |
|
165 | + $markerArray['###FORWARD###'] = '<span title="'.htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)).'">'.htmlspecialchars(sprintf($this->pi_getLL('forwardXPages', ''), $pageSteps)).'</span>'; |
|
166 | 166 | } |
167 | 167 | // Link to last page. |
168 | 168 | if ($this->piVars['page'] < $this->doc->numPages) { |
169 | 169 | $markerArray['###LAST###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('lastPage', '')), ['page' => $this->doc->numPages]); |
170 | 170 | } else { |
171 | - $markerArray['###LAST###'] = '<span title="' . htmlspecialchars($this->pi_getLL('lastPage', '')) . '">' . htmlspecialchars($this->pi_getLL('lastPage', '')) . '</span>'; |
|
171 | + $markerArray['###LAST###'] = '<span title="'.htmlspecialchars($this->pi_getLL('lastPage', '')).'">'.htmlspecialchars($this->pi_getLL('lastPage', '')).'</span>'; |
|
172 | 172 | } |
173 | 173 | // Add double page switcher. |
174 | 174 | if ($this->doc->numPages > 0) { |
175 | 175 | if (!$this->piVars['double']) { |
176 | - $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOn', '')), ['double' => 1], 'class="tx-dlf-navigation-doubleOn" title="' . htmlspecialchars($this->pi_getLL('doublePageOn', '')) . '"'); |
|
176 | + $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOn', '')), ['double' => 1], 'class="tx-dlf-navigation-doubleOn" title="'.htmlspecialchars($this->pi_getLL('doublePageOn', '')).'"'); |
|
177 | 177 | } else { |
178 | - $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOff', '')), ['double' => 0], 'class="tx-dlf-navigation-doubleOff" title="' . htmlspecialchars($this->pi_getLL('doublePageOff', '')) . '"'); |
|
178 | + $markerArray['###DOUBLEPAGE###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePageOff', '')), ['double' => 0], 'class="tx-dlf-navigation-doubleOff" title="'.htmlspecialchars($this->pi_getLL('doublePageOff', '')).'"'); |
|
179 | 179 | } |
180 | 180 | if ($this->piVars['double'] && $this->piVars['page'] < $this->doc->numPages) { |
181 | - $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePage+1', '')), ['page' => $this->piVars['page'] + 1], 'title="' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '"'); |
|
181 | + $markerArray['###DOUBLEPAGE+1###'] = $this->makeLink(htmlspecialchars($this->pi_getLL('doublePage+1', '')), ['page' => $this->piVars['page'] + 1], 'title="'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'"'); |
|
182 | 182 | } else { |
183 | - $markerArray['###DOUBLEPAGE+1###'] = '<span title="' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '">' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '</span>'; |
|
183 | + $markerArray['###DOUBLEPAGE+1###'] = '<span title="'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'">'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'</span>'; |
|
184 | 184 | } |
185 | 185 | } else { |
186 | - $markerArray['###DOUBLEPAGE###'] = '<span title="' . htmlspecialchars($this->pi_getLL('doublePageOn', '')) . '">' . htmlspecialchars($this->pi_getLL('doublePageOn', '')) . '</span>'; |
|
187 | - $markerArray['###DOUBLEPAGE+1###'] = '<span title="' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '">' . htmlspecialchars($this->pi_getLL('doublePage+1', '')) . '</span>'; |
|
186 | + $markerArray['###DOUBLEPAGE###'] = '<span title="'.htmlspecialchars($this->pi_getLL('doublePageOn', '')).'">'.htmlspecialchars($this->pi_getLL('doublePageOn', '')).'</span>'; |
|
187 | + $markerArray['###DOUBLEPAGE+1###'] = '<span title="'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'">'.htmlspecialchars($this->pi_getLL('doublePage+1', '')).'</span>'; |
|
188 | 188 | } |
189 | 189 | // Add page selector. |
190 | 190 | $markerArray['###PAGESELECT###'] = $this->getPageSelector(); |
@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | * @subpackage dlf |
26 | 26 | * @access public |
27 | 27 | */ |
28 | -class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin |
|
29 | -{ |
|
28 | +class Navigation extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
30 | 29 | public $scriptRelPath = 'Classes/Plugin/Navigation.php'; |
31 | 30 | |
32 | 31 | /** |
@@ -36,8 +35,7 @@ discard block |
||
36 | 35 | * |
37 | 36 | * @return string Link to the list view ready to output |
38 | 37 | */ |
39 | - protected function getLinkToListview() |
|
40 | - { |
|
38 | + protected function getLinkToListview() { |
|
41 | 39 | if (!empty($this->conf['targetPid'])) { |
42 | 40 | // Load the list. |
43 | 41 | $list = GeneralUtility::makeInstance(DocumentList::class); |
@@ -63,8 +61,7 @@ discard block |
||
63 | 61 | * |
64 | 62 | * @return string Page selector ready to output |
65 | 63 | */ |
66 | - protected function getPageSelector() |
|
67 | - { |
|
64 | + protected function getPageSelector() { |
|
68 | 65 | // Configure @action URL for form. |
69 | 66 | $linkConf = [ |
70 | 67 | 'parameter' => $GLOBALS['TSFE']->id, |
@@ -98,8 +95,7 @@ discard block |
||
98 | 95 | * |
99 | 96 | * @return string The content that is displayed on the website |
100 | 97 | */ |
101 | - public function main($content, $conf) |
|
102 | - { |
|
98 | + public function main($content, $conf) { |
|
103 | 99 | $this->init($conf); |
104 | 100 | // Turn cache on. |
105 | 101 | $this->setCache(true); |
@@ -214,8 +210,7 @@ discard block |
||
214 | 210 | * |
215 | 211 | * @return string Typolink ready to output |
216 | 212 | */ |
217 | - protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') |
|
218 | - { |
|
213 | + protected function makeLink($label, array $overrulePIvars = [], $aTagParams = '') { |
|
219 | 214 | // Merge plugin variables with new set of values. |
220 | 215 | if (is_array($this->piVars)) { |
221 | 216 | $piVars = $this->piVars; |
@@ -102,10 +102,10 @@ discard block |
||
102 | 102 | { |
103 | 103 | $this->init($conf); |
104 | 104 | // Turn cache on. |
105 | - $this->setCache(true); |
|
105 | + $this->setCache(TRUE); |
|
106 | 106 | // Load current document. |
107 | 107 | $this->loadDocument(); |
108 | - if ($this->doc === null) { |
|
108 | + if ($this->doc === NULL) { |
|
109 | 109 | // Quit without doing anything if required variables are not set. |
110 | 110 | return $content; |
111 | 111 | } else { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | 'forceAbsoluteUrl' => !empty($this->conf['forceAbsoluteUrl']) ? 1 : 0, |
230 | 230 | 'forceAbsoluteUrl.' => ['scheme' => !empty($this->conf['forceAbsoluteUrl']) && !empty($this->conf['forceAbsoluteUrlHttps']) ? 'https' : 'http'], |
231 | 231 | 'ATagParams' => $aTagParams, |
232 | - 'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', true, false), |
|
232 | + 'additionalParams' => GeneralUtility::implodeArrayForUrl($this->prefixId, $overrulePIvars, '', TRUE, FALSE), |
|
233 | 233 | 'title' => $label |
234 | 234 | ]; |
235 | 235 | return $this->cObj->typoLink($label, $conf); |
@@ -23,10 +23,8 @@ |
||
23 | 23 | * @subpackage dlf |
24 | 24 | * @access public |
25 | 25 | */ |
26 | -class DocumentTypeProvider extends AbstractProvider |
|
27 | -{ |
|
28 | - public function __construct() |
|
29 | - { |
|
26 | +class DocumentTypeProvider extends AbstractProvider { |
|
27 | + public function __construct() { |
|
30 | 28 | $this->expressionLanguageProviders = [ |
31 | 29 | DocumentTypeFunctionProvider::class |
32 | 30 | ]; |
@@ -205,21 +205,21 @@ |
||
205 | 205 | ); |
206 | 206 | // Register tools for toolbox plugin. |
207 | 207 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'] = []; |
208 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool'; |
|
209 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool'; |
|
210 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool'; |
|
211 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool'; |
|
212 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool'; |
|
213 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool'; |
|
214 | -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY) . '_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool'; |
|
208 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltexttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltexttool'; |
|
209 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_annotationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.annotationtool'; |
|
210 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_fulltextdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.fulltextdownloadtool'; |
|
211 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagedownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagedownloadtool'; |
|
212 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_imagemanipulationtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.imagemanipulationtool'; |
|
213 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_pdfdownloadtool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.pdfdownloadtool'; |
|
214 | +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Plugin/Toolbox.php']['tools'][\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN($_EXTKEY).'_searchindocumenttool'] = 'LLL:EXT:dlf/Resources/Private/Language/Labels.xml:tx_dlf_toolbox.searchindocumenttool'; |
|
215 | 215 | // Register hooks. |
216 | 216 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
217 | 217 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \Kitodo\Dlf\Hooks\DataHandler::class; |
218 | 218 | $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/Classes/Common/MetsDocument.php']['hookClass'][] = \Kitodo\Dlf\Hooks\KitodoProductionHacks::class; |
219 | 219 | // Register AJAX eID handlers. |
220 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugin\Eid\SearchSuggest::class . '::main'; |
|
221 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Plugin\Eid\SearchInDocument::class . '::main'; |
|
222 | -$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Plugin\Eid\PageViewProxy::class . '::main'; |
|
220 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = \Kitodo\Dlf\Plugin\Eid\SearchSuggest::class.'::main'; |
|
221 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_in_document'] = \Kitodo\Dlf\Plugin\Eid\SearchInDocument::class.'::main'; |
|
222 | +$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_pageview_proxy'] = \Kitodo\Dlf\Plugin\Eid\PageViewProxy::class.'::main'; |
|
223 | 223 | // Use Caching Framework for Solr queries |
224 | 224 | if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'])) { |
225 | 225 | $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_dlf_solr'] = []; |
@@ -22,8 +22,7 @@ discard block |
||
22 | 22 | * @subpackage dlf |
23 | 23 | * @access public |
24 | 24 | */ |
25 | -class FulltextDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin |
|
26 | -{ |
|
25 | +class FulltextDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin { |
|
27 | 26 | public $scriptRelPath = 'Classes/Plugin/Tools/FulltextDownloadTool.php'; |
28 | 27 | |
29 | 28 | /** |
@@ -36,8 +35,7 @@ discard block |
||
36 | 35 | * |
37 | 36 | * @return string The content that is displayed on the website |
38 | 37 | */ |
39 | - public function main($content, $conf) |
|
40 | - { |
|
38 | + public function main($content, $conf) { |
|
41 | 39 | $this->init($conf); |
42 | 40 | // Merge configuration with conf array of toolbox. |
43 | 41 | if (!empty($this->cObj->data['conf'])) { |
@@ -47,7 +47,7 @@ |
||
47 | 47 | // Load current document. |
48 | 48 | $this->loadDocument(); |
49 | 49 | if ( |
50 | - $this->doc === null |
|
50 | + $this->doc === NULL |
|
51 | 51 | || $this->doc->numPages < 1 |
52 | 52 | || empty($this->conf['fileGrpFulltext']) |
53 | 53 | ) { |
@@ -83,9 +83,9 @@ |
||
83 | 83 | } |
84 | 84 | } |
85 | 85 | if (!empty($fullTextFile)) { |
86 | - $markerArray['###FULLTEXT_DOWNLOAD###'] = '<a href="#" id="tx-dlf-tools-fulltextdownload" title="' . htmlspecialchars($this->pi_getLL('download-current-page', '')) . '">' . htmlspecialchars($this->pi_getLL('download-current-page', '')) . '</a>'; |
|
86 | + $markerArray['###FULLTEXT_DOWNLOAD###'] = '<a href="#" id="tx-dlf-tools-fulltextdownload" title="'.htmlspecialchars($this->pi_getLL('download-current-page', '')).'">'.htmlspecialchars($this->pi_getLL('download-current-page', '')).'</a>'; |
|
87 | 87 | } else { |
88 | - $markerArray['###FULLTEXT_DOWNLOAD###'] = '<span class="no-fulltext">' . htmlspecialchars($this->pi_getLL('fulltext-not-available', '')) . '</span>'; |
|
88 | + $markerArray['###FULLTEXT_DOWNLOAD###'] = '<span class="no-fulltext">'.htmlspecialchars($this->pi_getLL('fulltext-not-available', '')).'</span>'; |
|
89 | 89 | } |
90 | 90 | $content .= $this->templateService->substituteMarkerArray($this->template, $markerArray); |
91 | 91 | return $this->pi_wrapInBaseClass($content); |