@@ -35,8 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
37 | 37 | */ |
38 | - public function findAllByUids($uids) |
|
39 | - { |
|
38 | + public function findAllByUids($uids) { |
|
40 | 39 | $query = $this->createQuery(); |
41 | 40 | |
42 | 41 | $constraints = []; |
@@ -49,8 +48,7 @@ discard block |
||
49 | 48 | return $query->execute(); |
50 | 49 | } |
51 | 50 | |
52 | - public function getCollectionForMetadata($pages) |
|
53 | - { |
|
51 | + public function getCollectionForMetadata($pages) { |
|
54 | 52 | // Get list of collections to show. |
55 | 53 | $query = $this->createQuery(); |
56 | 54 | |
@@ -66,8 +64,7 @@ discard block |
||
66 | 64 | * |
67 | 65 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
68 | 66 | */ |
69 | - public function findCollectionsBySettings($settings = []) |
|
70 | - { |
|
67 | + public function findCollectionsBySettings($settings = []) { |
|
71 | 68 | $query = $this->createQuery(); |
72 | 69 | |
73 | 70 | $constraints = []; |
@@ -104,8 +101,7 @@ discard block |
||
104 | 101 | return $query->execute(); |
105 | 102 | } |
106 | 103 | |
107 | - public function getIndexNameForSolr($settings, $set) |
|
108 | - { |
|
104 | + public function getIndexNameForSolr($settings, $set) { |
|
109 | 105 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
110 | 106 | ->getQueryBuilderForTable('tx_dlf_collections'); |
111 | 107 |
@@ -25,8 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return void |
27 | 27 | */ |
28 | - public function deleteExpiredTokens($expireTime) |
|
29 | - { |
|
28 | + public function deleteExpiredTokens($expireTime) { |
|
30 | 29 | $query = $this->createQuery(); |
31 | 30 | |
32 | 31 | $constraints = []; |
@@ -18,8 +18,7 @@ |
||
18 | 18 | class MailRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
19 | 19 | { |
20 | 20 | |
21 | - public function findAllWithPid($pid) |
|
22 | - { |
|
21 | + public function findAllWithPid($pid) { |
|
23 | 22 | /** @var Typo3QuerySettings $querySettings */ |
24 | 23 | $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); |
25 | 24 |
@@ -109,14 +109,12 @@ discard block |
||
109 | 109 | /** |
110 | 110 | * constructor |
111 | 111 | */ |
112 | - public function __construct() |
|
113 | - { |
|
112 | + public function __construct() { |
|
114 | 113 | // Do not remove the next line: It would break the functionality |
115 | 114 | $this->initStorageObjects(); |
116 | 115 | } |
117 | 116 | |
118 | - protected function initStorageObjects() |
|
119 | - { |
|
117 | + protected function initStorageObjects() { |
|
120 | 118 | $this->format = new ObjectStorage(); |
121 | 119 | } |
122 | 120 | |
@@ -187,8 +185,7 @@ discard block |
||
187 | 185 | /** |
188 | 186 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\MetadataFormat> $format |
189 | 187 | */ |
190 | - public function getFormat() |
|
191 | - { |
|
188 | + public function getFormat() { |
|
192 | 189 | return $this->format; |
193 | 190 | } |
194 | 191 | |
@@ -207,8 +204,7 @@ discard block |
||
207 | 204 | * |
208 | 205 | * @return void |
209 | 206 | */ |
210 | - public function addFormat(MetadataFormat $format) |
|
211 | - { |
|
207 | + public function addFormat(MetadataFormat $format) { |
|
212 | 208 | $this->format->attach($format); |
213 | 209 | } |
214 | 210 | |
@@ -219,8 +215,7 @@ discard block |
||
219 | 215 | * |
220 | 216 | * @return void |
221 | 217 | */ |
222 | - public function removeFormat(MetadataFormat $formatToRemove) |
|
223 | - { |
|
218 | + public function removeFormat(MetadataFormat $formatToRemove) { |
|
224 | 219 | $this->format->detach($formatToRemove); |
225 | 220 | } |
226 | 221 |
@@ -192,14 +192,12 @@ discard block |
||
192 | 192 | /** |
193 | 193 | * constructor |
194 | 194 | */ |
195 | - public function __construct() |
|
196 | - { |
|
195 | + public function __construct() { |
|
197 | 196 | // Do not remove the next line: It would break the functionality |
198 | 197 | $this->initStorageObjects(); |
199 | 198 | } |
200 | 199 | |
201 | - protected function initStorageObjects() |
|
202 | - { |
|
200 | + protected function initStorageObjects() { |
|
203 | 201 | $this->collections = new ObjectStorage(); |
204 | 202 | } |
205 | 203 | |
@@ -577,8 +575,7 @@ discard block |
||
577 | 575 | * |
578 | 576 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> $collections |
579 | 577 | */ |
580 | - public function getCollections() |
|
581 | - { |
|
578 | + public function getCollections() { |
|
582 | 579 | return $this->collections; |
583 | 580 | } |
584 | 581 | |
@@ -607,8 +604,7 @@ discard block |
||
607 | 604 | * |
608 | 605 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Kitodo\Dlf\Domain\Model\Collection> collections |
609 | 606 | */ |
610 | - public function removeCollection(Collection $collection) |
|
611 | - { |
|
607 | + public function removeCollection(Collection $collection) { |
|
612 | 608 | $this->collections->detach($collection); |
613 | 609 | } |
614 | 610 |
@@ -29,8 +29,7 @@ discard block |
||
29 | 29 | * @subpackage dlf |
30 | 30 | * @access public |
31 | 31 | */ |
32 | -class MetadataController extends AbstractController |
|
33 | -{ |
|
32 | +class MetadataController extends AbstractController { |
|
34 | 33 | /** |
35 | 34 | * @var CollectionRepository |
36 | 35 | */ |
@@ -39,8 +38,7 @@ discard block |
||
39 | 38 | /** |
40 | 39 | * @param CollectionRepository $collectionRepository |
41 | 40 | */ |
42 | - public function injectCollectionRepository(CollectionRepository $collectionRepository) |
|
43 | - { |
|
41 | + public function injectCollectionRepository(CollectionRepository $collectionRepository) { |
|
44 | 42 | $this->collectionRepository = $collectionRepository; |
45 | 43 | } |
46 | 44 | |
@@ -52,8 +50,7 @@ discard block |
||
52 | 50 | /** |
53 | 51 | * @param MetadataRepository $metadataRepository |
54 | 52 | */ |
55 | - public function injectMetadataRepository(MetadataRepository $metadataRepository) |
|
56 | - { |
|
53 | + public function injectMetadataRepository(MetadataRepository $metadataRepository) { |
|
57 | 54 | $this->metadataRepository = $metadataRepository; |
58 | 55 | } |
59 | 56 | |
@@ -65,16 +62,14 @@ discard block |
||
65 | 62 | /** |
66 | 63 | * @param StructureRepository $structureRepository |
67 | 64 | */ |
68 | - public function injectStructureRepository(StructureRepository $structureRepository) |
|
69 | - { |
|
65 | + public function injectStructureRepository(StructureRepository $structureRepository) { |
|
70 | 66 | $this->structureRepository = $structureRepository; |
71 | 67 | } |
72 | 68 | |
73 | 69 | /** |
74 | 70 | * @return string|void |
75 | 71 | */ |
76 | - public function mainAction() |
|
77 | - { |
|
72 | + public function mainAction() { |
|
78 | 73 | $this->cObj = $this->configurationManager->getContentObject(); |
79 | 74 | |
80 | 75 | // Load current document. |
@@ -130,8 +125,7 @@ discard block |
||
130 | 125 | * |
131 | 126 | * @return string The metadata array ready for output |
132 | 127 | */ |
133 | - protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) |
|
134 | - { |
|
128 | + protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) { |
|
135 | 129 | if ($useOriginalIiifManifestMetadata) { |
136 | 130 | $iiifData = []; |
137 | 131 | foreach ($metadataArray as $metadata) { |
@@ -250,8 +244,7 @@ discard block |
||
250 | 244 | } |
251 | 245 | |
252 | 246 | if (is_array($metadataArray[$i][$metadataName])) { |
253 | - $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value) |
|
254 | - { |
|
247 | + $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value) { |
|
255 | 248 | return !empty($value); |
256 | 249 | })); |
257 | 250 | } |
@@ -273,8 +266,7 @@ discard block |
||
273 | 266 | * |
274 | 267 | * @return array metadata |
275 | 268 | */ |
276 | - private function getMetadata() |
|
277 | - { |
|
269 | + private function getMetadata() { |
|
278 | 270 | $metadata = []; |
279 | 271 | if ($this->settings['rootline'] < 2) { |
280 | 272 | // Get current structure's @ID. |
@@ -312,8 +304,7 @@ discard block |
||
312 | 304 | * |
313 | 305 | * @return array metadata |
314 | 306 | */ |
315 | - private function getMetadataForIds($id, $metadata) |
|
316 | - { |
|
307 | + private function getMetadataForIds($id, $metadata) { |
|
317 | 308 | $useOriginalIiifManifestMetadata = $this->settings['originalIiifMetadata'] == 1 && $this->document->getDoc() instanceof IiifManifest; |
318 | 309 | foreach ($id as $sid) { |
319 | 310 | if ($useOriginalIiifManifestMetadata) { |
@@ -23,8 +23,7 @@ discard block |
||
23 | 23 | * @subpackage dlf |
24 | 24 | * @access public |
25 | 25 | */ |
26 | -class TableOfContentsController extends AbstractController |
|
27 | -{ |
|
26 | +class TableOfContentsController extends AbstractController { |
|
28 | 27 | /** |
29 | 28 | * This holds the active entries according to the currently selected page |
30 | 29 | * |
@@ -43,8 +42,7 @@ discard block |
||
43 | 42 | * |
44 | 43 | * @return array HMENU array for menu entry |
45 | 44 | */ |
46 | - protected function getMenuEntry(array $entry, $recursive = false) |
|
47 | - { |
|
45 | + protected function getMenuEntry(array $entry, $recursive = false) { |
|
48 | 46 | $entryArray = []; |
49 | 47 | // Set "title", "volume", "type" and "pagination" from $entry array. |
50 | 48 | $entryArray['title'] = !empty($entry['label']) ? $entry['label'] : $entry['orderlabel']; |
@@ -131,8 +129,7 @@ discard block |
||
131 | 129 | * |
132 | 130 | * @return void |
133 | 131 | */ |
134 | - public function mainAction() |
|
135 | - { |
|
132 | + public function mainAction() { |
|
136 | 133 | $this->view->assign('toc', $this->makeMenuArray()); |
137 | 134 | } |
138 | 135 | |
@@ -142,8 +139,7 @@ discard block |
||
142 | 139 | * @access public |
143 | 140 | * @return array HMENU array |
144 | 141 | */ |
145 | - public function makeMenuArray() |
|
146 | - { |
|
142 | + public function makeMenuArray() { |
|
147 | 143 | // Load current document. |
148 | 144 | $this->loadDocument($this->requestData); |
149 | 145 | if ( |
@@ -44,8 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * @param DocumentRepository $documentRepository |
46 | 46 | */ |
47 | - public function injectDocumentRepository(DocumentRepository $documentRepository) |
|
48 | - { |
|
47 | + public function injectDocumentRepository(DocumentRepository $documentRepository) { |
|
49 | 48 | $this->documentRepository = $documentRepository; |
50 | 49 | } |
51 | 50 | |
@@ -85,8 +84,7 @@ discard block |
||
85 | 84 | * @access protected |
86 | 85 | * @return void |
87 | 86 | */ |
88 | - protected function initialize() |
|
89 | - { |
|
87 | + protected function initialize() { |
|
90 | 88 | $this->requestData = GeneralUtility::_GPmerged('tx_dlf'); |
91 | 89 | if (empty($this->requestData['page'])) { |
92 | 90 | $this->requestData['page'] = 1; |
@@ -112,8 +110,7 @@ discard block |
||
112 | 110 | * |
113 | 111 | * @return void |
114 | 112 | */ |
115 | - protected function loadDocument($requestData) |
|
116 | - { |
|
113 | + protected function loadDocument($requestData) { |
|
117 | 114 | // Try to get document format from database |
118 | 115 | if (!empty($requestData['id'])) { |
119 | 116 | |
@@ -186,8 +183,7 @@ discard block |
||
186 | 183 | * |
187 | 184 | * @return null|string|array |
188 | 185 | */ |
189 | - protected function getParametersSafely($parameterName) |
|
190 | - { |
|
186 | + protected function getParametersSafely($parameterName) { |
|
191 | 187 | if ($this->request->hasArgument($parameterName)) { |
192 | 188 | return $this->request->getArgument($parameterName); |
193 | 189 | } |
@@ -201,8 +197,7 @@ discard block |
||
201 | 197 | * |
202 | 198 | * @return void |
203 | 199 | */ |
204 | - public function __construct() |
|
205 | - { |
|
200 | + public function __construct() { |
|
206 | 201 | $this->initialize(); |
207 | 202 | } |
208 | 203 | } |
@@ -32,8 +32,7 @@ |
||
32 | 32 | * |
33 | 33 | * @return void |
34 | 34 | */ |
35 | - public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) |
|
36 | - { |
|
35 | + public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) { |
|
37 | 36 | $xml->registerXPathNamespace('teihdr', 'http://www.tei-c.org/ns/1.0'); |
38 | 37 | } |
39 | 38 | } |