@@ -106,6 +106,6 @@ |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | public function getProcessNumberString() { |
| 109 | - return strtoupper($this->getOwnerId()).'-'. $this->getYear().'-'.$this->getCounter(); |
|
| 109 | + return strtoupper($this->getOwnerId()) . '-' . $this->getYear() . '-' . $this->getCounter(); |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | \ No newline at end of file |
@@ -47,8 +47,7 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @return string $ownerId |
| 49 | 49 | */ |
| 50 | - public function getOwnerId() |
|
| 51 | - { |
|
| 50 | + public function getOwnerId() { |
|
| 52 | 51 | return $this->ownerId; |
| 53 | 52 | } |
| 54 | 53 | |
@@ -58,8 +57,7 @@ discard block |
||
| 58 | 57 | * @param string $ownerId |
| 59 | 58 | * @return void |
| 60 | 59 | */ |
| 61 | - public function setOwnerId($ownerId) |
|
| 62 | - { |
|
| 60 | + public function setOwnerId($ownerId) { |
|
| 63 | 61 | $this->ownerId = $ownerId; |
| 64 | 62 | } |
| 65 | 63 | |
@@ -68,8 +66,7 @@ discard block |
||
| 68 | 66 | * |
| 69 | 67 | * @return int $year |
| 70 | 68 | */ |
| 71 | - public function getYear() |
|
| 72 | - { |
|
| 69 | + public function getYear() { |
|
| 73 | 70 | return $this->year; |
| 74 | 71 | } |
| 75 | 72 | |
@@ -79,8 +76,7 @@ discard block |
||
| 79 | 76 | * @param int $year |
| 80 | 77 | * @return void |
| 81 | 78 | */ |
| 82 | - public function setYear($year) |
|
| 83 | - { |
|
| 79 | + public function setYear($year) { |
|
| 84 | 80 | $this->year = $year; |
| 85 | 81 | } |
| 86 | 82 | |
@@ -89,8 +85,7 @@ discard block |
||
| 89 | 85 | * |
| 90 | 86 | * @return int $counter |
| 91 | 87 | */ |
| 92 | - public function getCounter() |
|
| 93 | - { |
|
| 88 | + public function getCounter() { |
|
| 94 | 89 | return $this->counter; |
| 95 | 90 | } |
| 96 | 91 | |
@@ -100,8 +95,7 @@ discard block |
||
| 100 | 95 | * @param int $counter |
| 101 | 96 | * @return void |
| 102 | 97 | */ |
| 103 | - public function setCounter($counter) |
|
| 104 | - { |
|
| 98 | + public function setCounter($counter) { |
|
| 105 | 99 | $this->counter = $counter; |
| 106 | 100 | } |
| 107 | 101 | |
@@ -107,7 +107,6 @@ |
||
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Get PDF document list |
| 110 | - |
|
| 111 | 110 | * @return array of attachments |
| 112 | 111 | */ |
| 113 | 112 | protected function getAttachments() |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | if (is_array($dpfTSconfig['settings.'])) { |
| 48 | 48 | |
| 49 | - \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, true, false); |
|
| 49 | + \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, TRUE, FALSE); |
|
| 50 | 50 | $this->conf = $dpfTSconfig['settings.']; |
| 51 | 51 | |
| 52 | 52 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // Load current document. |
| 55 | 55 | $this->loadDocument(); |
| 56 | 56 | |
| 57 | - if ($this->doc === null || empty($this->conf['fileGrpDownload'])) { |
|
| 57 | + if ($this->doc === NULL || empty($this->conf['fileGrpDownload'])) { |
|
| 58 | 58 | |
| 59 | 59 | // Quit without doing anything if required variables are not set. |
| 60 | 60 | return $content; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | 'useCacheHash' => 0, |
| 88 | 88 | 'parameter' => $this->conf['apiPid'] . ' - piwik_download', |
| 89 | 89 | 'additionalParams' => '&tx_dpf[qid]=' . $this->doc->recordId . '&tx_dpf[action]=attachment' . '&tx_dpf[attachment]=' . $file['ID'], |
| 90 | - 'forceAbsoluteUrl' => true, |
|
| 90 | + 'forceAbsoluteUrl' => TRUE, |
|
| 91 | 91 | ); |
| 92 | 92 | |
| 93 | 93 | $title = $file['LABEL'] ? $file['LABEL'] : $file['ID']; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - return $this->cObj->substituteSubpart($this->template, '###DOWNLOADS###', $content, true); |
|
| 104 | + return $this->cObj->substituteSubpart($this->template, '###DOWNLOADS###', $content, TRUE); |
|
| 105 | 105 | |
| 106 | 106 | } |
| 107 | 107 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | foreach ($attachments as $id => $file) { |
| 89 | 89 | |
| 90 | - $conf = array( |
|
| 90 | + $conf = array ( |
|
| 91 | 91 | 'useCacheHash' => 0, |
| 92 | 92 | 'parameter' => $this->conf['apiPid'] . ' - piwik_download', |
| 93 | 93 | 'additionalParams' => '&tx_dpf[qid]=' . $this->doc->recordId . '&tx_dpf[action]=attachment' . '&tx_dpf[attachment]=' . $file['ID'], |
@@ -103,11 +103,11 @@ discard block |
||
| 103 | 103 | $markerArray['###FILE###'] = $this->cObj->typoLink($title, $conf); |
| 104 | 104 | |
| 105 | 105 | // Create a-tag with VG-Wort Redirect |
| 106 | - } elseif(!empty($vgwort)) { |
|
| 106 | + } elseif (!empty($vgwort)) { |
|
| 107 | 107 | |
| 108 | 108 | $qucosaUrl = urlencode($this->cObj->typoLink_URL($conf)); |
| 109 | 109 | |
| 110 | - $confVgwort = array( |
|
| 110 | + $confVgwort = array ( |
|
| 111 | 111 | 'useCacheHash' => 0, |
| 112 | 112 | 'parameter' => $vgwort . $qucosaUrl . ' - piwik_download', |
| 113 | 113 | ); |
@@ -141,13 +141,13 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | if (!is_array($files)) { |
| 143 | 143 | |
| 144 | - return array(); |
|
| 144 | + return array (); |
|
| 145 | 145 | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | foreach ($files as $key => $file) { |
| 149 | 149 | |
| 150 | - $singleFile = array(); |
|
| 150 | + $singleFile = array (); |
|
| 151 | 151 | |
| 152 | 152 | foreach ($file->attributes('mext', 1) as $attribute => $value) { |
| 153 | 153 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $xPath = '//slub:info/slub:vgwortOpenKey'; |
| 183 | 183 | $vgwortOpenKey = $this->doc->mets->xpath($xPath)[0]; |
| 184 | 184 | |
| 185 | - if (!empty($vgwortOpenKey) or $vgwortOpenKey != FALSE ) { |
|
| 185 | + if (!empty($vgwortOpenKey) or $vgwortOpenKey != FALSE) { |
|
| 186 | 186 | |
| 187 | 187 | if (GeneralUtility::getIndpEnv('TYPO3_SSL')) { |
| 188 | 188 | |
@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | * @subpackage tx_dpf |
| 25 | 25 | * @access public |
| 26 | 26 | */ |
| 27 | -class DownloadTool extends \tx_dlf_plugin |
|
| 28 | -{ |
|
| 27 | +class DownloadTool extends \tx_dlf_plugin { |
|
| 29 | 28 | |
| 30 | 29 | /** |
| 31 | 30 | * The main method of the PlugIn |
@@ -37,8 +36,7 @@ discard block |
||
| 37 | 36 | * |
| 38 | 37 | * @return string The content that is displayed on the website |
| 39 | 38 | */ |
| 40 | - public function main($content, $conf) |
|
| 41 | - { |
|
| 39 | + public function main($content, $conf) { |
|
| 42 | 40 | |
| 43 | 41 | $this->init($conf); |
| 44 | 42 | |
@@ -131,8 +129,7 @@ discard block |
||
| 131 | 129 | |
| 132 | 130 | * @return array of attachments |
| 133 | 131 | */ |
| 134 | - protected function getAttachments() |
|
| 135 | - { |
|
| 132 | + protected function getAttachments() { |
|
| 136 | 133 | |
| 137 | 134 | // Get pdf documents |
| 138 | 135 | $xPath = 'mets:fileSec/mets:fileGrp[@USE="' . $this->conf['fileGrpDownload'] . '"]/mets:file'; |
@@ -174,8 +171,7 @@ discard block |
||
| 174 | 171 | return $attachments; |
| 175 | 172 | } |
| 176 | 173 | |
| 177 | - protected function getVGWortUrl() |
|
| 178 | - { |
|
| 174 | + protected function getVGWortUrl() { |
|
| 179 | 175 | |
| 180 | 176 | // Get VG-Wort-OpenKey for document |
| 181 | 177 | $this->doc->mets->registerXPathNamespace("slub", 'http://slub-dresden.de/'); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $datetime = new \DateTime(); |
| 32 | 32 | $currentYear = $datetime->format('y'); |
| 33 | 33 | |
| 34 | - $processNumber = $processNumberRepository->getHighestProcessNumberByOwnerIdAndYear(strtolower($ownerId),$currentYear); |
|
| 34 | + $processNumber = $processNumberRepository->getHighestProcessNumberByOwnerIdAndYear(strtolower($ownerId), $currentYear); |
|
| 35 | 35 | |
| 36 | 36 | if ($processNumber) { |
| 37 | 37 | $counter = $processNumber->getCounter() + 1; |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | use EWW\Dpf\Domain\Model\ProcessNumber; |
| 21 | 21 | use EWW\Dpf\Domain\Repository\ClientRepository; |
| 22 | 22 | |
| 23 | -class ProcessNumberGenerator |
|
| 24 | -{ |
|
| 23 | +class ProcessNumberGenerator { |
|
| 25 | 24 | public function getProcessNumber($ownerId = NULL) { |
| 26 | 25 | $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class); |
| 27 | 26 | $processNumberRepository = $objectManager->get(ProcessNumberRepository::class); |
@@ -35,11 +35,11 @@ |
||
| 35 | 35 | protected $documentTransferLogRepository; |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | - * clientConfigurationManager |
|
| 39 | - * |
|
| 40 | - * @var \EWW\Dpf\Configuration\ClientConfigurationManager |
|
| 41 | - * @inject |
|
| 42 | - */ |
|
| 38 | + * clientConfigurationManager |
|
| 39 | + * |
|
| 40 | + * @var \EWW\Dpf\Configuration\ClientConfigurationManager |
|
| 41 | + * @inject |
|
| 42 | + */ |
|
| 43 | 43 | protected $clientConfigurationManager; |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | protected $response; |
| 53 | 53 | |
| 54 | - protected $errors = array(); |
|
| 54 | + protected $errors = array (); |
|
| 55 | 55 | |
| 56 | 56 | const X_ON_BEHALF_OF = 'X-On-Behalf-Of'; |
| 57 | 57 | const QUCOSA_TYPE = 'application/vnd.qucosa.mets+xml'; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 92 | 92 | $message = $exception->getMessage(); |
| 93 | - if (strpos(strtolower($message),"28 connection timed out") !== FALSE) { |
|
| 93 | + if (strpos(strtolower($message), "28 connection timed out") !== FALSE) { |
|
| 94 | 94 | throw new \EWW\Dpf\Exceptions\ConnectionTimeoutErrorException($message); |
| 95 | 95 | } else { |
| 96 | 96 | throw new \EWW\Dpf\Exceptions\ConnectionErrorException($message); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 139 | 139 | $message = $exception->getMessage(); |
| 140 | - if (strpos(strtolower($message),"28 connection timed out") !== FALSE) { |
|
| 140 | + if (strpos(strtolower($message), "28 connection timed out") !== FALSE) { |
|
| 141 | 141 | throw new \EWW\Dpf\Exceptions\ConnectionTimeoutErrorException($message); |
| 142 | 142 | } else { |
| 143 | 143 | throw new \EWW\Dpf\Exceptions\ConnectionErrorException($message); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 180 | 180 | $message = $exception->getMessage(); |
| 181 | - if (strpos(strtolower($message),"28 connection timed out") !== FALSE) { |
|
| 181 | + if (strpos(strtolower($message), "28 connection timed out") !== FALSE) { |
|
| 182 | 182 | throw new \EWW\Dpf\Exceptions\ConnectionTimeoutErrorException($message); |
| 183 | 183 | } else { |
| 184 | 184 | throw new \EWW\Dpf\Exceptions\ConnectionErrorException($message); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 222 | 222 | $message = $exception->getMessage(); |
| 223 | - if (strpos(strtolower($message),"28 connection timed out") !== FALSE) { |
|
| 223 | + if (strpos(strtolower($message), "28 connection timed out") !== FALSE) { |
|
| 224 | 224 | throw new \EWW\Dpf\Exceptions\ConnectionTimeoutErrorException($message); |
| 225 | 225 | } else { |
| 226 | 226 | throw new \EWW\Dpf\Exceptions\ConnectionErrorException($message); |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | |
| 277 | 277 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 278 | 278 | $message = $exception->getMessage(); |
| 279 | - if (strpos(strtolower($message),"28 connection timed out") !== FALSE) { |
|
| 279 | + if (strpos(strtolower($message), "28 connection timed out") !== FALSE) { |
|
| 280 | 280 | throw new \EWW\Dpf\Exceptions\ConnectionTimeoutErrorException($message); |
| 281 | 281 | } else { |
| 282 | 282 | throw new \EWW\Dpf\Exceptions\ConnectionErrorException($message); |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | use \EWW\Dpf\Services\Logger\TransferLogger; |
| 23 | 23 | use \Httpful\Request; |
| 24 | 24 | |
| 25 | -class FedoraRepository implements Repository |
|
| 26 | -{ |
|
| 25 | +class FedoraRepository implements Repository { |
|
| 27 | 26 | |
| 28 | 27 | /** |
| 29 | 28 | * documentTransferLogRepository |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | * @return string |
| 65 | 64 | * @throws \Exception |
| 66 | 65 | */ |
| 67 | - public function ingest($document, $metsXml) |
|
| 68 | - { |
|
| 66 | + public function ingest($document, $metsXml) { |
|
| 69 | 67 | try { |
| 70 | 68 | |
| 71 | 69 | $response = Request::post($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection()) |
@@ -84,8 +82,7 @@ discard block |
||
| 84 | 82 | TransferLogger::Log('INGEST', $document->getUid(), null, $response); |
| 85 | 83 | throw new \EWW\Dpf\Exceptions\IngestDocumentErrorException("Fedora error while ingest document."); |
| 86 | 84 | } |
| 87 | - } |
|
| 88 | - catch (\Exception $exception) { |
|
| 85 | + } catch (\Exception $exception) { |
|
| 89 | 86 | TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
| 90 | 87 | |
| 91 | 88 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
@@ -111,8 +108,7 @@ discard block |
||
| 111 | 108 | * @return string |
| 112 | 109 | * @throws \Exception |
| 113 | 110 | */ |
| 114 | - public function update($document, $metsXml) |
|
| 115 | - { |
|
| 111 | + public function update($document, $metsXml) { |
|
| 116 | 112 | |
| 117 | 113 | $remoteId = $document->getObjectIdentifier(); |
| 118 | 114 | |
@@ -157,8 +153,7 @@ discard block |
||
| 157 | 153 | * @return string |
| 158 | 154 | * @throws \Exception |
| 159 | 155 | */ |
| 160 | - public function retrieve($remoteId) |
|
| 161 | - { |
|
| 156 | + public function retrieve($remoteId) { |
|
| 162 | 157 | |
| 163 | 158 | try { |
| 164 | 159 | $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/objects/" . $remoteId . "/methods/qucosa:SDef/getMETSDissemination") |
@@ -198,8 +193,7 @@ discard block |
||
| 198 | 193 | * @return string |
| 199 | 194 | * @throws \Exception |
| 200 | 195 | */ |
| 201 | - public function getNextDocumentId() |
|
| 202 | - { |
|
| 196 | + public function getNextDocumentId() { |
|
| 203 | 197 | |
| 204 | 198 | try { |
| 205 | 199 | $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/management/getNextPID?numPIDs=1&namespace=qucosa&xml=true") |
@@ -241,8 +235,7 @@ discard block |
||
| 241 | 235 | * @return boolean |
| 242 | 236 | * @throws \Exception |
| 243 | 237 | */ |
| 244 | - public function delete($document, $state) |
|
| 245 | - { |
|
| 238 | + public function delete($document, $state) { |
|
| 246 | 239 | |
| 247 | 240 | $remoteId = $document->getObjectIdentifier(); |
| 248 | 241 | |
@@ -295,8 +288,7 @@ discard block |
||
| 295 | 288 | * @param \Httpful\Response $response |
| 296 | 289 | * @return string |
| 297 | 290 | */ |
| 298 | - protected function getRemoteDocumentId($response) |
|
| 299 | - { |
|
| 291 | + protected function getRemoteDocumentId($response) { |
|
| 300 | 292 | |
| 301 | 293 | // Get repository ID and write into document |
| 302 | 294 | $responseDom = new \DOMDocument(); |
@@ -313,8 +305,7 @@ discard block |
||
| 313 | 305 | return null; |
| 314 | 306 | } |
| 315 | 307 | |
| 316 | - protected function getOwnerId() |
|
| 317 | - { |
|
| 308 | + protected function getOwnerId() { |
|
| 318 | 309 | $ownerId = $this->clientConfigurationManager->getOwnerId(); |
| 319 | 310 | if (empty($ownerId)) { |
| 320 | 311 | throw new \Exception('Owner id can not be empty or null!'); |
@@ -323,8 +314,7 @@ discard block |
||
| 323 | 314 | return $ownerId; |
| 324 | 315 | } |
| 325 | 316 | |
| 326 | - protected function getSWORDCollection() |
|
| 327 | - { |
|
| 317 | + protected function getSWORDCollection() { |
|
| 328 | 318 | return $this->clientConfigurationManager->getSwordCollectionNamespace(); |
| 329 | 319 | } |
| 330 | 320 | } |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | if (!$response->hasErrors() && $response->code == 201) { |
| 82 | 82 | return $this->getRemoteDocumentId($response); |
| 83 | 83 | } else { |
| 84 | - TransferLogger::Log('INGEST', $document->getUid(), null, $response); |
|
| 84 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $response); |
|
| 85 | 85 | throw new \EWW\Dpf\Exceptions\IngestDocumentErrorException("Fedora error while ingest document."); |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | catch (\Exception $exception) { |
| 89 | - TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
|
| 89 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $exception->getMessage()); |
|
| 90 | 90 | |
| 91 | 91 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 92 | 92 | $message = $exception->getMessage(); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - return null; |
|
| 103 | + return NULL; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | throw new \EWW\Dpf\Exceptions\UpdateDocumentErrorException("Fedora error while update document."); |
| 134 | 134 | } |
| 135 | 135 | } catch (\Exception $exception) { |
| 136 | - TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
|
| 136 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $exception->getMessage()); |
|
| 137 | 137 | |
| 138 | 138 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 139 | 139 | $message = $exception->getMessage(); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - return null; |
|
| 150 | + return NULL; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | if (!$response->hasErrors() && $response->code == 200) { |
| 171 | 171 | return $response->__toString(); |
| 172 | 172 | } else { |
| 173 | - TransferLogger::Log('RETRIEVE', null, $remoteId, $response); |
|
| 173 | + TransferLogger::Log('RETRIEVE', NULL, $remoteId, $response); |
|
| 174 | 174 | throw new \EWW\Dpf\Exceptions\RetrieveDocumentErrorException("Fedora has returned an error."); |
| 175 | 175 | } |
| 176 | 176 | } catch (\Exception $exception) { |
| 177 | - TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
|
| 177 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $exception->getMessage()); |
|
| 178 | 178 | |
| 179 | 179 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 180 | 180 | $message = $exception->getMessage(); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - return null; |
|
| 191 | + return NULL; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
@@ -212,11 +212,11 @@ discard block |
||
| 212 | 212 | if (!$response->hasErrors() && $response->code == 200) { |
| 213 | 213 | return $response->__toString(); |
| 214 | 214 | } else { |
| 215 | - TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, null, $response); |
|
| 215 | + TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, NULL, $response); |
|
| 216 | 216 | throw new \EWW\Dpf\Exceptions\NextDocumentIdErrorException("Fedora error while getting a document id."); |
| 217 | 217 | } |
| 218 | 218 | } catch (\Exception $exception) { |
| 219 | - TransferLogger::Log('INGEST', null, null, $exception->getMessage()); |
|
| 219 | + TransferLogger::Log('INGEST', NULL, NULL, $exception->getMessage()); |
|
| 220 | 220 | |
| 221 | 221 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 222 | 222 | $message = $exception->getMessage(); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - return null; |
|
| 233 | + return NULL; |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | /** |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | // if transfer successful |
| 258 | 258 | if (!$response->hasErrors() && $response->code == 204) { |
| 259 | - return true; |
|
| 259 | + return TRUE; |
|
| 260 | 260 | } else { |
| 261 | 261 | TransferLogger::Log('DELETE', $document->getUid(), $remoteId, $response); |
| 262 | 262 | switch ($state) { |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 | } catch (\Exception $exception) { |
| 275 | - TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
|
| 275 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $exception->getMessage()); |
|
| 276 | 276 | |
| 277 | 277 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 278 | 278 | $message = $exception->getMessage(); |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | } |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | - return false; |
|
| 289 | + return FALSE; |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | return $objectIdentifier; |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | - return null; |
|
| 313 | + return NULL; |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | protected function getOwnerId() |
@@ -439,7 +439,7 @@ |
||
| 439 | 439 | |
| 440 | 440 | $domXPath2 = \EWW\Dpf\Helper\XPath::create($doc2); |
| 441 | 441 | |
| 442 | - // second part nested xpath |
|
| 442 | + // second part nested xpath |
|
| 443 | 443 | if ($match[2] && $secondMatch[2]) { |
| 444 | 444 | // import node from nested |
| 445 | 445 | $docXMLNested = new \DOMDocument(); |
@@ -24,13 +24,13 @@ discard block |
||
| 24 | 24 | * |
| 25 | 25 | * @var array |
| 26 | 26 | */ |
| 27 | - protected $formData = array(); |
|
| 27 | + protected $formData = array (); |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * files from form |
| 31 | 31 | * @var array |
| 32 | 32 | */ |
| 33 | - protected $files = array(); |
|
| 33 | + protected $files = array (); |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * metsData |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | $nestedXml = $this->parseXPath($nested); |
| 369 | 369 | |
| 370 | 370 | // object xpath without nested element [] |
| 371 | - $newPath[1] = str_replace('['.$match[2].']', '', $newPath[1]); |
|
| 371 | + $newPath[1] = str_replace('[' . $match[2] . ']', '', $newPath[1]); |
|
| 372 | 372 | |
| 373 | 373 | $xml = $this->parseXPath($newPath[1]); |
| 374 | 374 | |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | $nestedXml = $this->parseXPath($nested); |
| 430 | 430 | |
| 431 | 431 | // object xpath without nested element [] |
| 432 | - $newPath[1] = str_replace('['.$match[2].']', '', $newPath[1]); |
|
| 432 | + $newPath[1] = str_replace('[' . $match[2] . ']', '', $newPath[1]); |
|
| 433 | 433 | |
| 434 | 434 | $xml2 = $this->parseXPath($path . $newPath[1]); |
| 435 | 435 | } |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * simpleXMLElement |
| 74 | 74 | */ |
| 75 | - protected $sxe = null; |
|
| 75 | + protected $sxe = NULL; |
|
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * xPathXMLGenerator |
| 79 | 79 | * @var object |
| 80 | 80 | */ |
| 81 | - protected $parser = null; |
|
| 81 | + protected $parser = NULL; |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * ref id counter |
@@ -173,26 +173,26 @@ discard block |
||
| 173 | 173 | $xmlData = $modsWrap->firstChild->firstChild->firstChild->firstChild; |
| 174 | 174 | |
| 175 | 175 | // import mods into mets |
| 176 | - $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, true); |
|
| 176 | + $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, TRUE); |
|
| 177 | 177 | $xmlData->appendChild($nodeAppendModsData); |
| 178 | 178 | |
| 179 | 179 | // add SLUB data |
| 180 | - $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, true); |
|
| 180 | + $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, TRUE); |
|
| 181 | 181 | $modsWrap->firstChild->appendChild($nodeAppendModsData); |
| 182 | 182 | |
| 183 | 183 | if ($fileSection) { |
| 184 | 184 | // add filesection |
| 185 | - $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, true); |
|
| 185 | + $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, TRUE); |
|
| 186 | 186 | $modsWrap->firstChild->appendChild($nodeAppendModsData); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | if ($structureMap) { |
| 190 | 190 | // add structure map |
| 191 | - $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, true); |
|
| 191 | + $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, TRUE); |
|
| 192 | 192 | $modsWrap->firstChild->appendChild($nodeAppendModsData); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - $modsWrap->formatOutput = true; |
|
| 195 | + $modsWrap->formatOutput = TRUE; |
|
| 196 | 196 | $modsWrap->encoding = 'UTF-8'; |
| 197 | 197 | |
| 198 | 198 | $this->metsData = $modsWrap; |
@@ -254,28 +254,28 @@ discard block |
||
| 254 | 254 | $attributeXPath .= '[@ID="QUCOSA_' . $counter . '"]'; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - $existsExtensionFlag = false; |
|
| 257 | + $existsExtensionFlag = FALSE; |
|
| 258 | 258 | $i = 0; |
| 259 | 259 | // loop each object |
| 260 | 260 | if (!empty($values)) { |
| 261 | 261 | foreach ($values as $value) { |
| 262 | 262 | |
| 263 | 263 | if ($value['modsExtension']) { |
| 264 | - $existsExtensionFlag = true; |
|
| 264 | + $existsExtensionFlag = TRUE; |
|
| 265 | 265 | // mods extension |
| 266 | 266 | $counter = sprintf("%'03d", $this->counter); |
| 267 | 267 | $referenceAttribute = $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]'; |
| 268 | 268 | |
| 269 | 269 | $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping']; |
| 270 | 270 | |
| 271 | - $xml = $this->customXPath($path, false, $value['value']); |
|
| 271 | + $xml = $this->customXPath($path, FALSE, $value['value']); |
|
| 272 | 272 | } else { |
| 273 | 273 | $path = $mapping . $attributeXPath . '%/' . $value['mapping']; |
| 274 | 274 | |
| 275 | 275 | if ($i == 0) { |
| 276 | - $newGroupFlag = true; |
|
| 276 | + $newGroupFlag = TRUE; |
|
| 277 | 277 | } else { |
| 278 | - $newGroupFlag = false; |
|
| 278 | + $newGroupFlag = FALSE; |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | $xml = $this->customXPath($path, $newGroupFlag, $value['value']); |
@@ -287,12 +287,12 @@ discard block |
||
| 287 | 287 | } else { |
| 288 | 288 | if (!empty($attributeXPath)) { |
| 289 | 289 | $path = $mapping . $attributeXPath; |
| 290 | - $xml = $this->customXPath($path, true, '', true); |
|
| 290 | + $xml = $this->customXPath($path, TRUE, '', TRUE); |
|
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | if (!$existsExtensionFlag && $group['modsExtensionMapping']) { |
| 294 | 294 | $xPath = $group['modsExtensionMapping'] . $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]'; |
| 295 | - $xml = $this->customXPath($xPath, true, '', true); |
|
| 295 | + $xml = $this->customXPath($xPath, TRUE, '', TRUE); |
|
| 296 | 296 | } |
| 297 | 297 | if ($group['modsExtensionMapping']) { |
| 298 | 298 | $this->counter++; |
@@ -322,13 +322,13 @@ discard block |
||
| 322 | 322 | * @param string $value form value |
| 323 | 323 | * @return xml created xml |
| 324 | 324 | */ |
| 325 | - public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) |
|
| 325 | + public function customXPath($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE) |
|
| 326 | 326 | { |
| 327 | 327 | if (!$attributeOnly) { |
| 328 | 328 | // Explode xPath |
| 329 | 329 | $newPath = explode('%', $xPath); |
| 330 | 330 | |
| 331 | - $praedicateFlag = false; |
|
| 331 | + $praedicateFlag = FALSE; |
|
| 332 | 332 | $explodedXPath = explode('[', $newPath[0]); |
| 333 | 333 | if (count($explodedXPath) > 1) { |
| 334 | 334 | // praedicate is given |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | $path = $explodedXPath[0]; |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | - $praedicateFlag = true; |
|
| 343 | + $praedicateFlag = TRUE; |
|
| 344 | 344 | } else { |
| 345 | 345 | $path = $newPath[0]; |
| 346 | 346 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | $nodeList = $xPath->query('/mods:mods' . $match[1]); |
| 391 | 391 | $node = $nodeList->item(0); |
| 392 | 392 | |
| 393 | - $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true); |
|
| 393 | + $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE); |
|
| 394 | 394 | |
| 395 | 395 | $node->appendChild($importNode); |
| 396 | 396 | } |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | $node = $domNodeList->item(0)->firstChild; |
| 403 | 403 | |
| 404 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 404 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 405 | 405 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 406 | 406 | } else { |
| 407 | 407 | // first xpath doesn't exist |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $nodeList = $xPath->query('/mods:mods/' . $path . $match[1]); |
| 450 | 450 | $node = $nodeList->item(0); |
| 451 | 451 | |
| 452 | - $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true); |
|
| 452 | + $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE); |
|
| 453 | 453 | |
| 454 | 454 | $node->appendChild($importNode); |
| 455 | 455 | } |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | $domNode2 = $domXPath2->query('/mods:mods/' . $path)->item(0)->childNodes->item(0); |
| 458 | 458 | |
| 459 | 459 | // merge xml nodes |
| 460 | - $nodeToBeAppended = $doc1->importNode($domNode2, true); |
|
| 460 | + $nodeToBeAppended = $doc1->importNode($domNode2, TRUE); |
|
| 461 | 461 | |
| 462 | 462 | $domNode->item(0)->appendChild($nodeToBeAppended); |
| 463 | 463 | |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | $firstChild = $this->xmlData->firstChild; |
| 467 | 467 | $firstItem = $doc1->getElementsByTagName('mods')->item(0)->firstChild; |
| 468 | 468 | |
| 469 | - $nodeAppendModsData = $this->xmlData->importNode($firstItem, true); |
|
| 469 | + $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE); |
|
| 470 | 470 | $firstChild->appendChild($nodeAppendModsData); |
| 471 | 471 | |
| 472 | 472 | return $doc1->saveXML(); |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | |
| 486 | 486 | $node = $domNodeList->item(0)->firstChild; |
| 487 | 487 | |
| 488 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 488 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 489 | 489 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 490 | 490 | |
| 491 | 491 | return $docXML->saveXML(); |
@@ -494,13 +494,13 @@ discard block |
||
| 494 | 494 | return $this->xmlData->saveXML(); |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | - public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) |
|
| 497 | + public function customXPathSlub($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE) |
|
| 498 | 498 | { |
| 499 | 499 | if (!$attributeOnly) { |
| 500 | 500 | // Explode xPath |
| 501 | 501 | $newPath = explode('%', $xPath); |
| 502 | 502 | |
| 503 | - $praedicateFlag = false; |
|
| 503 | + $praedicateFlag = FALSE; |
|
| 504 | 504 | $explodedXPath = explode('[', $newPath[0]); |
| 505 | 505 | if (count($explodedXPath) > 1) { |
| 506 | 506 | // praedicate is given |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | $path = $explodedXPath[0]; |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | - $praedicateFlag = true; |
|
| 515 | + $praedicateFlag = TRUE; |
|
| 516 | 516 | } else { |
| 517 | 517 | $path = $newPath[0]; |
| 518 | 518 | } |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | |
| 540 | 540 | $node = $domNodeList->item(0)->firstChild; |
| 541 | 541 | |
| 542 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 542 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 543 | 543 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 544 | 544 | } else { |
| 545 | 545 | // first xpath doesn't exist |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | $domNode2 = $domXPath2->query('/slub:info/' . $path)->item(0)->childNodes->item(0); |
| 569 | 569 | |
| 570 | 570 | // merge xml nodes |
| 571 | - $nodeToBeAppended = $doc1->importNode($domNode2, true); |
|
| 571 | + $nodeToBeAppended = $doc1->importNode($domNode2, TRUE); |
|
| 572 | 572 | |
| 573 | 573 | $domNode->item(0)->appendChild($nodeToBeAppended); |
| 574 | 574 | |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | $firstChild = $this->xmlData->firstChild; |
| 579 | 579 | $firstItem = $doc1->getElementsByTagName('info')->item(0)->firstChild; |
| 580 | 580 | |
| 581 | - $nodeAppendModsData = $this->xmlData->importNode($firstItem, true); |
|
| 581 | + $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE); |
|
| 582 | 582 | $firstChild->appendChild($nodeAppendModsData); |
| 583 | 583 | |
| 584 | 584 | return $doc1->saveXML(); |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | |
| 598 | 598 | $node = $domNodeList->item(0)->firstChild; |
| 599 | 599 | |
| 600 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 600 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 601 | 601 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 602 | 602 | |
| 603 | 603 | return $docXML->saveXML(); |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | $second = $this->slubData; |
| 853 | 853 | |
| 854 | 854 | foreach ($second->childNodes as $node) { |
| 855 | - $importNode = $domDocument->importNode($node, true); |
|
| 855 | + $importNode = $domDocument->importNode($node, TRUE); |
|
| 856 | 856 | $domWrapElement->appendChild($importNode); |
| 857 | 857 | } |
| 858 | 858 | |
@@ -909,15 +909,15 @@ discard block |
||
| 909 | 909 | |
| 910 | 910 | $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping']; |
| 911 | 911 | |
| 912 | - $xml = $this->customXPathSlub($path, false, $value['value']); |
|
| 912 | + $xml = $this->customXPathSlub($path, FALSE, $value['value']); |
|
| 913 | 913 | } else { |
| 914 | 914 | $path = $mapping . $attributeXPath . '%/' . $value['mapping']; |
| 915 | 915 | // print_r($path);print_r("\n"); |
| 916 | 916 | |
| 917 | 917 | if ($i == 0) { |
| 918 | - $newGroupFlag = true; |
|
| 918 | + $newGroupFlag = TRUE; |
|
| 919 | 919 | } else { |
| 920 | - $newGroupFlag = false; |
|
| 920 | + $newGroupFlag = FALSE; |
|
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | $xml = $this->customXPathSlub($path, $newGroupFlag, $value['value']); |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | } else { |
| 931 | 931 | if (!empty($attributeXPath)) { |
| 932 | 932 | $path = $mapping . $attributeXPath; |
| 933 | - $xml = $this->customXPathSlub($path, true, '', true); |
|
| 933 | + $xml = $this->customXPathSlub($path, TRUE, '', TRUE); |
|
| 934 | 934 | } |
| 935 | 935 | } |
| 936 | 936 | |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * MetsExporter |
| 19 | 19 | */ |
| 20 | -class MetsExporter |
|
| 21 | -{ |
|
| 20 | +class MetsExporter { |
|
| 22 | 21 | /** |
| 23 | 22 | * formData |
| 24 | 23 | * |
@@ -96,8 +95,7 @@ discard block |
||
| 96 | 95 | /** |
| 97 | 96 | * Constructor |
| 98 | 97 | */ |
| 99 | - public function __construct() |
|
| 100 | - { |
|
| 98 | + public function __construct() { |
|
| 101 | 99 | // mets data beginning |
| 102 | 100 | $this->metsHeader = '<mets:mets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 103 | 101 | xmlns:mets="http://www.loc.gov/METS/" xmlns:xlink="http://www.w3.org/1999/xlink" |
@@ -138,8 +136,7 @@ discard block |
||
| 138 | 136 | * returns the mets xml string |
| 139 | 137 | * @return string mets xml |
| 140 | 138 | */ |
| 141 | - public function getMetsData() |
|
| 142 | - { |
|
| 139 | + public function getMetsData() { |
|
| 143 | 140 | $xml = $this->metsData->saveXML(); |
| 144 | 141 | |
| 145 | 142 | $xml = preg_replace("/eww=\"\d-\d-\d\"/", '${1}${2}${3}', $xml); |
@@ -152,8 +149,7 @@ discard block |
||
| 152 | 149 | * returns the mods xml string |
| 153 | 150 | * @return string mods xml |
| 154 | 151 | */ |
| 155 | - public function getModsData() |
|
| 156 | - { |
|
| 152 | + public function getModsData() { |
|
| 157 | 153 | return $this->modsData->saveXML(); |
| 158 | 154 | } |
| 159 | 155 | |
@@ -161,8 +157,7 @@ discard block |
||
| 161 | 157 | * Build mets data structure |
| 162 | 158 | * @return string mets xml |
| 163 | 159 | */ |
| 164 | - public function buildMets() |
|
| 165 | - { |
|
| 160 | + public function buildMets() { |
|
| 166 | 161 | // get mods domDocument |
| 167 | 162 | $modsWrap = $this->buildModsWrap(); |
| 168 | 163 | // get mets filesection |
@@ -203,8 +198,7 @@ discard block |
||
| 203 | 198 | * @param xml $xml xml data which should be wrapped with mods |
| 204 | 199 | * @return xml wrapped xml |
| 205 | 200 | */ |
| 206 | - public function wrapMods($xml) |
|
| 207 | - { |
|
| 201 | + public function wrapMods($xml) { |
|
| 208 | 202 | $newXML = $this->modsHeader; |
| 209 | 203 | |
| 210 | 204 | $newXML = str_replace("</mods:mods>", $xml . "</mods:mods>", $newXML); |
@@ -212,8 +206,7 @@ discard block |
||
| 212 | 206 | return $newXML; |
| 213 | 207 | } |
| 214 | 208 | |
| 215 | - public function wrapSlub($xml) |
|
| 216 | - { |
|
| 209 | + public function wrapSlub($xml) { |
|
| 217 | 210 | $newXML = $this->slubHeader; |
| 218 | 211 | |
| 219 | 212 | $newXML = str_replace("</slub:info>", $xml . "</slub:info>", $newXML); |
@@ -225,8 +218,7 @@ discard block |
||
| 225 | 218 | * build mods from form array |
| 226 | 219 | * @param array $array structured form data array |
| 227 | 220 | */ |
| 228 | - public function buildModsFromForm($array) |
|
| 229 | - { |
|
| 221 | + public function buildModsFromForm($array) { |
|
| 230 | 222 | $this->xmlData = $this->modsData; |
| 231 | 223 | // Build xml mods from form fields |
| 232 | 224 | // loop each group |
@@ -308,8 +300,7 @@ discard block |
||
| 308 | 300 | * @param xpath $xPath xPath expression |
| 309 | 301 | * @return xml |
| 310 | 302 | */ |
| 311 | - public function parseXPath($xPath) |
|
| 312 | - { |
|
| 303 | + public function parseXPath($xPath) { |
|
| 313 | 304 | |
| 314 | 305 | $this->parser->generateXmlFromXPath($xPath); |
| 315 | 306 | $xml = $this->parser->getXML(); |
@@ -323,8 +314,7 @@ discard block |
||
| 323 | 314 | * @param string $value form value |
| 324 | 315 | * @return xml created xml |
| 325 | 316 | */ |
| 326 | - public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) |
|
| 327 | - { |
|
| 317 | + public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) { |
|
| 328 | 318 | if (!$attributeOnly) { |
| 329 | 319 | // Explode xPath |
| 330 | 320 | $newPath = explode('%', $xPath); |
@@ -495,8 +485,7 @@ discard block |
||
| 495 | 485 | return $this->xmlData->saveXML(); |
| 496 | 486 | } |
| 497 | 487 | |
| 498 | - public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) |
|
| 499 | - { |
|
| 488 | + public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) { |
|
| 500 | 489 | if (!$attributeOnly) { |
| 501 | 490 | // Explode xPath |
| 502 | 491 | $newPath = explode('%', $xPath); |
@@ -610,8 +599,7 @@ discard block |
||
| 610 | 599 | * Builds the xml wrapping part for mods |
| 611 | 600 | * @return xml |
| 612 | 601 | */ |
| 613 | - public function buildModsWrap() |
|
| 614 | - { |
|
| 602 | + public function buildModsWrap() { |
|
| 615 | 603 | // Build wrap for mod |
| 616 | 604 | |
| 617 | 605 | $domDocument = new \DOMDocument(); |
@@ -649,8 +637,7 @@ discard block |
||
| 649 | 637 | * Builds xml amdSection |
| 650 | 638 | * @return xml |
| 651 | 639 | */ |
| 652 | - public function buildAmdSection() |
|
| 653 | - { |
|
| 640 | + public function buildAmdSection() { |
|
| 654 | 641 | // Build xml amd:sec |
| 655 | 642 | |
| 656 | 643 | $domDocument = new \DOMDocument(); |
@@ -661,8 +648,7 @@ discard block |
||
| 661 | 648 | $amdSec = $domDocument->createElement('mets:amdSec'); |
| 662 | 649 | } |
| 663 | 650 | |
| 664 | - public function setMods($value = '') |
|
| 665 | - { |
|
| 651 | + public function setMods($value = '') { |
|
| 666 | 652 | $domDocument = new \DOMDocument(); |
| 667 | 653 | if (is_null(@$domDocument->loadXML($value))) { |
| 668 | 654 | throw new \Exception("Couldn't load MODS data"); |
@@ -670,13 +656,11 @@ discard block |
||
| 670 | 656 | $this->modsData = $domDocument; |
| 671 | 657 | } |
| 672 | 658 | |
| 673 | - public function setFileData($value = '') |
|
| 674 | - { |
|
| 659 | + public function setFileData($value = '') { |
|
| 675 | 660 | $this->files = $value; |
| 676 | 661 | } |
| 677 | 662 | |
| 678 | - public function loopFiles($array, $domElement, $domDocument) |
|
| 679 | - { |
|
| 663 | + public function loopFiles($array, $domElement, $domDocument) { |
|
| 680 | 664 | $i = 0; |
| 681 | 665 | // set xml for uploded files |
| 682 | 666 | foreach ($array as $key => $value) { |
@@ -721,8 +705,7 @@ discard block |
||
| 721 | 705 | * Builds the xml fileSection part if files are uploaded |
| 722 | 706 | * @return xml |
| 723 | 707 | */ |
| 724 | - public function buildFileSection() |
|
| 725 | - { |
|
| 708 | + public function buildFileSection() { |
|
| 726 | 709 | if (empty($this->files['original']) && empty($this->files['download'])) { |
| 727 | 710 | return; |
| 728 | 711 | } |
@@ -769,8 +752,7 @@ discard block |
||
| 769 | 752 | * Builds the xml structMap part if files are uploaded |
| 770 | 753 | * @return xml |
| 771 | 754 | */ |
| 772 | - public function buildStructureMap() |
|
| 773 | - { |
|
| 755 | + public function buildStructureMap() { |
|
| 774 | 756 | // Build xml Mets:structMap |
| 775 | 757 | |
| 776 | 758 | $domDocument = new \DOMDocument(); |
@@ -809,8 +791,7 @@ discard block |
||
| 809 | 791 | return $domDocument; |
| 810 | 792 | } |
| 811 | 793 | |
| 812 | - public function setSlubInfo($value = '') |
|
| 813 | - { |
|
| 794 | + public function setSlubInfo($value = '') { |
|
| 814 | 795 | // build DOMDocument with slub xml |
| 815 | 796 | $domDocument = new \DOMDocument(); |
| 816 | 797 | $domDocument->loadXML($value); |
@@ -822,8 +803,7 @@ discard block |
||
| 822 | 803 | * @param Array $array Array with slub information |
| 823 | 804 | * @return xml xml slubInfo |
| 824 | 805 | */ |
| 825 | - public function buildMetsSlub() |
|
| 826 | - { |
|
| 806 | + public function buildMetsSlub() { |
|
| 827 | 807 | $domDocument = new \DOMDocument(); |
| 828 | 808 | $domDocument->loadXML('<mets:amdSec ID="AMD_000" xmlns:mets="http://www.loc.gov/METS/"></mets:amdSec>'); |
| 829 | 809 | $domWrapElement = $domDocument->firstChild; |
@@ -864,8 +844,7 @@ discard block |
||
| 864 | 844 | * returns the mods xml string |
| 865 | 845 | * @return string mods xml |
| 866 | 846 | */ |
| 867 | - public function getSlubData() |
|
| 868 | - { |
|
| 847 | + public function getSlubData() { |
|
| 869 | 848 | return $this->slubData->saveXML(); |
| 870 | 849 | } |
| 871 | 850 | |
@@ -873,8 +852,7 @@ discard block |
||
| 873 | 852 | * |
| 874 | 853 | * @param string $slubInfoData |
| 875 | 854 | */ |
| 876 | - public function buildSlubInfoFromForm($slubInfoData, $documentType, $processNumber) |
|
| 877 | - { |
|
| 855 | + public function buildSlubInfoFromForm($slubInfoData, $documentType, $processNumber) { |
|
| 878 | 856 | $this->xmlData = $this->slubData; |
| 879 | 857 | if (is_array($slubInfoData['metadata'])) { |
| 880 | 858 | foreach ($slubInfoData['metadata'] as $key => $group) { |
@@ -957,8 +935,7 @@ discard block |
||
| 957 | 935 | * |
| 958 | 936 | * @return string slub info xml |
| 959 | 937 | */ |
| 960 | - public function getSlubInfoData() |
|
| 961 | - { |
|
| 938 | + public function getSlubInfoData() { |
|
| 962 | 939 | return $this->slubData->saveXML(); |
| 963 | 940 | } |
| 964 | 941 | |
@@ -967,8 +944,7 @@ discard block |
||
| 967 | 944 | * @param string $objId |
| 968 | 945 | * @return void |
| 969 | 946 | */ |
| 970 | - public function setObjId($objId) |
|
| 971 | - { |
|
| 947 | + public function setObjId($objId) { |
|
| 972 | 948 | $this->objId = $objId; |
| 973 | 949 | } |
| 974 | 950 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $clients = $clientRepository->findAllByPid($pid); |
| 40 | 40 | if ($clients) { |
| 41 | 41 | if (count($clients) != 1) { |
| 42 | - throw new \Exception('Invalid number of client records for pid: '.$pid); |
|
| 42 | + throw new \Exception('Invalid number of client records for pid: ' . $pid); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -32,7 +32,9 @@ |
||
| 32 | 32 | |
| 33 | 33 | $documents = $documentRepository->findDocumentsWithoutProcessNumber(); |
| 34 | 34 | |
| 35 | - if (count($documents) == 0) return; |
|
| 35 | + if (count($documents) == 0) { |
|
| 36 | + return; |
|
| 37 | + } |
|
| 36 | 38 | |
| 37 | 39 | foreach ($documents as $document) { |
| 38 | 40 | $pid = $document->getPid(); |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * DocumentTypeController |
| 19 | 19 | */ |
| 20 | -class DocumentTypeController extends \EWW\Dpf\Controller\AbstractController |
|
| 21 | -{ |
|
| 20 | +class DocumentTypeController extends \EWW\Dpf\Controller\AbstractController { |
|
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | 23 | * documentTypeRepository |
@@ -33,8 +32,7 @@ discard block |
||
| 33 | 32 | * |
| 34 | 33 | * @return void |
| 35 | 34 | */ |
| 36 | - public function listAction() |
|
| 37 | - { |
|
| 35 | + public function listAction() { |
|
| 38 | 36 | $documentTypes = $this->documentTypeRepository->findAll(); |
| 39 | 37 | $this->view->assign('documentTypes', $documentTypes); |
| 40 | 38 | } |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 46 | 44 | * @return void |
| 47 | 45 | */ |
| 48 | - public function showAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) |
|
| 49 | - { |
|
| 46 | + public function showAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) { |
|
| 50 | 47 | $this->view->assign('documentType', $documentType); |
| 51 | 48 | } |
| 52 | 49 | |
@@ -57,8 +54,7 @@ discard block |
||
| 57 | 54 | * @ignorevalidation $newDocumentType |
| 58 | 55 | * @return void |
| 59 | 56 | */ |
| 60 | - public function newAction(\EWW\Dpf\Domain\Model\DocumentType $newDocumentType = null) |
|
| 61 | - { |
|
| 57 | + public function newAction(\EWW\Dpf\Domain\Model\DocumentType $newDocumentType = null) { |
|
| 62 | 58 | $this->view->assign('newDocumentType', $newDocumentType); |
| 63 | 59 | } |
| 64 | 60 | |
@@ -68,8 +64,7 @@ discard block |
||
| 68 | 64 | * @param \EWW\Dpf\Domain\Model\DocumentType $newDocumentType |
| 69 | 65 | * @return void |
| 70 | 66 | */ |
| 71 | - public function createAction(\EWW\Dpf\Domain\Model\DocumentType $newDocumentType) |
|
| 72 | - { |
|
| 67 | + public function createAction(\EWW\Dpf\Domain\Model\DocumentType $newDocumentType) { |
|
| 73 | 68 | $this->addFlashMessage('The object was created. Please be aware that this action is publicly accessible unless you implement an access check. See <a href="http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain" target="_blank">Wiki</a>', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
| 74 | 69 | $this->documentTypeRepository->add($newDocumentType); |
| 75 | 70 | $this->redirect('list'); |
@@ -82,8 +77,7 @@ discard block |
||
| 82 | 77 | * @ignorevalidation $documentType |
| 83 | 78 | * @return void |
| 84 | 79 | */ |
| 85 | - public function editAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) |
|
| 86 | - { |
|
| 80 | + public function editAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) { |
|
| 87 | 81 | $this->view->assign('documentType', $documentType); |
| 88 | 82 | } |
| 89 | 83 | |
@@ -93,8 +87,7 @@ discard block |
||
| 93 | 87 | * @param \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 94 | 88 | * @return void |
| 95 | 89 | */ |
| 96 | - public function updateAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) |
|
| 97 | - { |
|
| 90 | + public function updateAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) { |
|
| 98 | 91 | $this->addFlashMessage('The object was updated. Please be aware that this action is publicly accessible unless you implement an access check. See <a href="http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain" target="_blank">Wiki</a>', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
| 99 | 92 | $this->documentTypeRepository->update($documentType); |
| 100 | 93 | $this->redirect('list'); |
@@ -106,8 +99,7 @@ discard block |
||
| 106 | 99 | * @param \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 107 | 100 | * @return void |
| 108 | 101 | */ |
| 109 | - public function deleteAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) |
|
| 110 | - { |
|
| 102 | + public function deleteAction(\EWW\Dpf\Domain\Model\DocumentType $documentType) { |
|
| 111 | 103 | $this->addFlashMessage('The object was deleted. Please be aware that this action is publicly accessible unless you implement an access check. See <a href="http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain" target="_blank">Wiki</a>', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
| 112 | 104 | $this->documentTypeRepository->remove($documentType); |
| 113 | 105 | $this->redirect('list'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository |
| 27 | 27 | * @inject |
| 28 | 28 | */ |
| 29 | - protected $documentTypeRepository = null; |
|
| 29 | + protected $documentTypeRepository = NULL; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * action list |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @ignorevalidation $newDocumentType |
| 58 | 58 | * @return void |
| 59 | 59 | */ |
| 60 | - public function newAction(\EWW\Dpf\Domain\Model\DocumentType $newDocumentType = null) |
|
| 60 | + public function newAction(\EWW\Dpf\Domain\Model\DocumentType $newDocumentType = NULL) |
|
| 61 | 61 | { |
| 62 | 62 | $this->view->assign('newDocumentType', $newDocumentType); |
| 63 | 63 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $this->currentPage = 1; |
| 89 | 89 | } else { |
| 90 | 90 | // restore query |
| 91 | - $this->query = (!empty($session[$this->action]['query'])) ? $session[$this->action]['query'] : array(); |
|
| 91 | + $this->query = (!empty($session[$this->action]['query'])) ? $session[$this->action]['query'] : array (); |
|
| 92 | 92 | // set current page |
| 93 | 93 | if ((!empty($currentPage))) { |
| 94 | 94 | $this->currentPage = MathUtility::forceIntegerInRange($currentPage, 1); |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | private function viewAssign() |
| 199 | 199 | { |
| 200 | - $this->view->assign('query', $this->query); |
|
| 201 | - $this->view->assign('resultList', $this->resultList); |
|
| 200 | + $this->view->assign('query', $this->query); |
|
| 201 | + $this->view->assign('resultList', $this->resultList); |
|
| 202 | 202 | $this->view->assign('currentPage', $this->currentPage); |
| 203 | 203 | } |
| 204 | 204 | } |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * SearchFEController |
| 21 | 21 | */ |
| 22 | -class SearchFEController extends \EWW\Dpf\Controller\AbstractSearchController |
|
| 23 | -{ |
|
| 22 | +class SearchFEController extends \EWW\Dpf\Controller\AbstractSearchController { |
|
| 24 | 23 | |
| 25 | 24 | /** |
| 26 | 25 | * action |
@@ -63,8 +62,7 @@ discard block |
||
| 63 | 62 | /** |
| 64 | 63 | * __construct |
| 65 | 64 | */ |
| 66 | - public function __construct() |
|
| 67 | - { |
|
| 65 | + public function __construct() { |
|
| 68 | 66 | // get session data |
| 69 | 67 | $session = $this->getSessionData('tx_dpf_frontendsearch'); |
| 70 | 68 | // get action |
@@ -103,8 +101,7 @@ discard block |
||
| 103 | 101 | * action search |
| 104 | 102 | * @return void |
| 105 | 103 | */ |
| 106 | - public function searchAction() |
|
| 107 | - { |
|
| 104 | + public function searchAction() { |
|
| 108 | 105 | if ($this->action == 'extendedSearch') { |
| 109 | 106 | $this->forward('extendedSearch'); |
| 110 | 107 | } |
@@ -120,8 +117,7 @@ discard block |
||
| 120 | 117 | * action extendedSearch |
| 121 | 118 | * @return void |
| 122 | 119 | */ |
| 123 | - public function extendedSearchAction() |
|
| 124 | - { |
|
| 120 | + public function extendedSearchAction() { |
|
| 125 | 121 | if ($this->action == 'search') { |
| 126 | 122 | $this->forward('search'); |
| 127 | 123 | } |
@@ -139,8 +135,7 @@ discard block |
||
| 139 | 135 | * @param array $query |
| 140 | 136 | * @return array $results |
| 141 | 137 | */ |
| 142 | - private function getResults($query) |
|
| 143 | - { |
|
| 138 | + private function getResults($query) { |
|
| 144 | 139 | $size = $this->settings['list']['paginate']['itemsPerPage']; |
| 145 | 140 | |
| 146 | 141 | $query['body']['from'] = ($this->currentPage - 1) * $size; |
@@ -156,8 +151,7 @@ discard block |
||
| 156 | 151 | * dummy action for showSearchForm Action used in sidebar |
| 157 | 152 | * @return void |
| 158 | 153 | */ |
| 159 | - public static function showSearchFormAction() |
|
| 160 | - { |
|
| 154 | + public static function showSearchFormAction() { |
|
| 161 | 155 | |
| 162 | 156 | } |
| 163 | 157 | |
@@ -165,8 +159,7 @@ discard block |
||
| 165 | 159 | * set session data |
| 166 | 160 | * @return void |
| 167 | 161 | */ |
| 168 | - private function setSession() |
|
| 169 | - { |
|
| 162 | + private function setSession() { |
|
| 170 | 163 | $session[$this->action] = array ( |
| 171 | 164 | 'query' => $this->query, |
| 172 | 165 | 'currentPage' => $this->currentPage |
@@ -178,8 +171,7 @@ discard block |
||
| 178 | 171 | * create docTypes |
| 179 | 172 | * @return void |
| 180 | 173 | */ |
| 181 | - private function docTypes() |
|
| 182 | - { |
|
| 174 | + private function docTypes() { |
|
| 183 | 175 | // get document types |
| 184 | 176 | $allTypes = $this->documentTypeRepository->findAll(); |
| 185 | 177 | // add empty field |
@@ -195,8 +187,7 @@ discard block |
||
| 195 | 187 | * create view |
| 196 | 188 | * @return void |
| 197 | 189 | */ |
| 198 | - private function viewAssign() |
|
| 199 | - { |
|
| 190 | + private function viewAssign() { |
|
| 200 | 191 | $this->view->assign('query', $this->query); |
| 201 | 192 | $this->view->assign('resultList', $this->resultList); |
| 202 | 193 | $this->view->assign('currentPage', $this->currentPage); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @var \EWW\Dpf\Domain\Repository\SysLanguageRepository |
| 27 | 27 | * @inject |
| 28 | 28 | */ |
| 29 | - protected $sysLanguageRepository = null; |
|
| 29 | + protected $sysLanguageRepository = NULL; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * clientRepository |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @var \EWW\Dpf\Domain\Repository\ClientRepository |
| 35 | 35 | * @inject |
| 36 | 36 | */ |
| 37 | - protected $clientRepository = null; |
|
| 37 | + protected $clientRepository = NULL; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * InputOptionListRepository |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @var \EWW\Dpf\Domain\Repository\InputOptionListRepository |
| 43 | 43 | * @inject |
| 44 | 44 | */ |
| 45 | - protected $inputOptionListRepository = null; |
|
| 45 | + protected $inputOptionListRepository = NULL; |
|
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * persistence manager |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * |
| 93 | 93 | * @param \EWW\Dpf\Domain\Model\Client $newClient |
| 94 | 94 | */ |
| 95 | - public function newAction(\EWW\Dpf\Domain\Model\Client $newClient = null) |
|
| 95 | + public function newAction(\EWW\Dpf\Domain\Model\Client $newClient = NULL) |
|
| 96 | 96 | { |
| 97 | 97 | if ($this->isValidClientFolder()) { |
| 98 | 98 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | "", |
| 101 | 101 | $messageTitle = 'Der ausgewählte Ordner enthält noch keine Mandanten-Konfiguration!', |
| 102 | 102 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING, |
| 103 | - $storeInSession = true |
|
| 103 | + $storeInSession = TRUE |
|
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | $this->view->assign('isValidClientFolder', $this->isValidClientFolder()); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | "Mittels des Listen-Moduls können Sie nun die weitere Konfiguration durchführen.", |
| 128 | 128 | $messageTitle = 'Der QUCOSA-Client wurde erfolgreich angelegt!', |
| 129 | 129 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::OK, |
| 130 | - $storeInSession = true |
|
| 130 | + $storeInSession = TRUE |
|
| 131 | 131 | ); |
| 132 | 132 | $this->redirect('default'); |
| 133 | 133 | } |
@@ -152,9 +152,9 @@ discard block |
||
| 152 | 152 | "Bitte wählen Sie im Seitenbaum einen Systemordner aus, der als QUCOSA-Client initialisiert werden soll.", |
| 153 | 153 | $messageTitle = 'Bitte wählen Sie einen Zielordner aus!', |
| 154 | 154 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::INFO, |
| 155 | - $storeInSession = true |
|
| 155 | + $storeInSession = TRUE |
|
| 156 | 156 | ); |
| 157 | - return false; |
|
| 157 | + return FALSE; |
|
| 158 | 158 | } else { |
| 159 | 159 | |
| 160 | 160 | // check if the selected page already contains a QUCOSA-Client or if it is a subpage of a Client. |
@@ -171,9 +171,9 @@ discard block |
||
| 171 | 171 | "Dieser Ordner ist bereits Bestandteil eines initialisierten QUCOSA-Clients.", |
| 172 | 172 | $messageTitle = 'Eine Initialisierung ist hier leider nicht möglich!', |
| 173 | 173 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR, |
| 174 | - $storeInSession = true |
|
| 174 | + $storeInSession = TRUE |
|
| 175 | 175 | ); |
| 176 | - return false; |
|
| 176 | + return FALSE; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | if ($this->pageInfo['doktype'] != 254) { |
@@ -181,13 +181,13 @@ discard block |
||
| 181 | 181 | "Bitte wählen Sie einen Systemordner aus, nur diese können als QUCOSA-Client verwendet werden.", |
| 182 | 182 | $messageTitle = 'Eine Initialisierung ist hier leider nicht möglich!', |
| 183 | 183 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR, |
| 184 | - $storeInSession = true |
|
| 184 | + $storeInSession = TRUE |
|
| 185 | 185 | ); |
| 186 | - return false; |
|
| 186 | + return FALSE; |
|
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - return true; |
|
| 190 | + return TRUE; |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | protected $persistenceManager; |
| 58 | 58 | |
| 59 | 59 | // TypoScript settings |
| 60 | - protected $settings = array(); |
|
| 60 | + protected $settings = array (); |
|
| 61 | 61 | |
| 62 | 62 | // Id of the selected page in the page tree |
| 63 | 63 | protected $selectedPageUid; |
@@ -218,10 +218,10 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | if ($inputOptionTranslator->hasTranslation($inputOptionTranslator->getDefaultLanguage())) { |
| 220 | 220 | $valueLabelList = $inputOptionTranslator->translate($iso6392b->getValues()); |
| 221 | - $displayName = $inputOptionTranslator->translate(array('languageList')); |
|
| 221 | + $displayName = $inputOptionTranslator->translate(array ('languageList')); |
|
| 222 | 222 | } else { |
| 223 | 223 | $valueLabelList = $inputOptionTranslator->translate($iso6392b->getValues(), 'en'); |
| 224 | - $displayName = $inputOptionTranslator->translate(array('languageList'), 'en'); |
|
| 224 | + $displayName = $inputOptionTranslator->translate(array ('languageList'), 'en'); |
|
| 225 | 225 | } |
| 226 | 226 | $languageOptionList->setDisplayName(implode('', $displayName)); |
| 227 | 227 | $languageOptionList->setValueLabelList(implode('|', $valueLabelList)); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | if ($inputOptionTranslator->hasTranslation($langIsoCode)) { |
| 239 | 239 | // only when a translation exists, a translation dataset is created |
| 240 | 240 | $valueLabelList = $inputOptionTranslator->translate($iso6392b->getValues(), $langIsoCode); |
| 241 | - $displayName = $inputOptionTranslator->translate(array('languageList'), $langIsoCode); |
|
| 241 | + $displayName = $inputOptionTranslator->translate(array ('languageList'), $langIsoCode); |
|
| 242 | 242 | |
| 243 | 243 | $translatedOptionList = $this->objectManager->get(InputOptionList::class); |
| 244 | 244 | $translatedOptionList->setDisplayName(implode('', $displayName)); |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * ClientController |
| 23 | 23 | */ |
| 24 | -class ClientController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController |
|
| 25 | -{ |
|
| 24 | +class ClientController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { |
|
| 26 | 25 | |
| 27 | 26 | /** |
| 28 | 27 | * sysLanguageRepository |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | // Page information of selected page |
| 66 | 65 | protected $pageInfo; |
| 67 | 66 | |
| 68 | - protected function initializeAction() |
|
| 69 | - { |
|
| 67 | + protected function initializeAction() { |
|
| 70 | 68 | |
| 71 | 69 | $this->selectedPageUid = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'); |
| 72 | 70 | |
@@ -80,13 +78,11 @@ discard block |
||
| 80 | 78 | ); |
| 81 | 79 | } |
| 82 | 80 | |
| 83 | - protected function getPageInfo($pageUid) |
|
| 84 | - { |
|
| 81 | + protected function getPageInfo($pageUid) { |
|
| 85 | 82 | return \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1)); |
| 86 | 83 | } |
| 87 | 84 | |
| 88 | - protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) |
|
| 89 | - { |
|
| 85 | + protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { |
|
| 90 | 86 | parent::initializeView($view); |
| 91 | 87 | |
| 92 | 88 | } |
@@ -96,8 +92,7 @@ discard block |
||
| 96 | 92 | * |
| 97 | 93 | * @param \EWW\Dpf\Domain\Model\Client $newClient |
| 98 | 94 | */ |
| 99 | - public function newAction(\EWW\Dpf\Domain\Model\Client $newClient = null) |
|
| 100 | - { |
|
| 95 | + public function newAction(\EWW\Dpf\Domain\Model\Client $newClient = null) { |
|
| 101 | 96 | if ($this->isValidClientFolder()) { |
| 102 | 97 | |
| 103 | 98 | $this->addFlashMessage( |
@@ -118,8 +113,7 @@ discard block |
||
| 118 | 113 | * |
| 119 | 114 | * @param \EWW\Dpf\Domain\Model\Client $newClient |
| 120 | 115 | */ |
| 121 | - public function createAction(\EWW\Dpf\Domain\Model\Client $newClient) |
|
| 122 | - { |
|
| 116 | + public function createAction(\EWW\Dpf\Domain\Model\Client $newClient) { |
|
| 123 | 117 | |
| 124 | 118 | if ($this->isValidClientFolder()) { |
| 125 | 119 | $newClient->setPid($this->selectedPageUid); |
@@ -143,13 +137,11 @@ discard block |
||
| 143 | 137 | * default action |
| 144 | 138 | * |
| 145 | 139 | */ |
| 146 | - public function defaultAction() |
|
| 147 | - { |
|
| 140 | + public function defaultAction() { |
|
| 148 | 141 | |
| 149 | 142 | } |
| 150 | 143 | |
| 151 | - protected function isValidClientFolder() |
|
| 152 | - { |
|
| 144 | + protected function isValidClientFolder() { |
|
| 153 | 145 | |
| 154 | 146 | if (!$this->selectedPageUid) { |
| 155 | 147 | $this->addFlashMessage( |
@@ -199,8 +191,7 @@ discard block |
||
| 199 | 191 | * |
| 200 | 192 | * @param integer $storagePid |
| 201 | 193 | */ |
| 202 | - protected function addBaseInputOptionLists($storagePid) |
|
| 203 | - { |
|
| 194 | + protected function addBaseInputOptionLists($storagePid) { |
|
| 204 | 195 | |
| 205 | 196 | $iso6392b = $this->objectManager->get(Iso6392b::class); |
| 206 | 197 | |