@@ -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 | /** |
@@ -23,8 +23,7 @@ discard block |
||
| 23 | 23 | use \EWW\Dpf\Services\Logger\TransferLogger; |
| 24 | 24 | use \Httpful\Request; |
| 25 | 25 | |
| 26 | -class FedoraRepository implements Repository |
|
| 27 | -{ |
|
| 26 | +class FedoraRepository implements Repository { |
|
| 28 | 27 | |
| 29 | 28 | /** |
| 30 | 29 | * documentTransferLogRepository |
@@ -61,8 +60,7 @@ discard block |
||
| 61 | 60 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 62 | 61 | * @return string |
| 63 | 62 | */ |
| 64 | - public function ingest($document, $metsXml) |
|
| 65 | - { |
|
| 63 | + public function ingest($document, $metsXml) { |
|
| 66 | 64 | |
| 67 | 65 | try { |
| 68 | 66 | $response = Request::post($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection()) |
@@ -96,8 +94,7 @@ discard block |
||
| 96 | 94 | * @param string $metsXml |
| 97 | 95 | * @return string |
| 98 | 96 | */ |
| 99 | - public function update($document, $metsXml) |
|
| 100 | - { |
|
| 97 | + public function update($document, $metsXml) { |
|
| 101 | 98 | |
| 102 | 99 | $remoteId = $document->getObjectIdentifier(); |
| 103 | 100 | |
@@ -129,8 +126,7 @@ discard block |
||
| 129 | 126 | * @param string $remoteId |
| 130 | 127 | * @return string |
| 131 | 128 | */ |
| 132 | - public function retrieve($remoteId) |
|
| 133 | - { |
|
| 129 | + public function retrieve($remoteId) { |
|
| 134 | 130 | |
| 135 | 131 | try { |
| 136 | 132 | $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/objects/" . $remoteId . "/methods/qucosa:SDef/getMETSDissemination") |
@@ -159,8 +155,7 @@ discard block |
||
| 159 | 155 | * @param string $remoteId |
| 160 | 156 | * @return string |
| 161 | 157 | */ |
| 162 | - public function getNextDocumentId() |
|
| 163 | - { |
|
| 158 | + public function getNextDocumentId() { |
|
| 164 | 159 | |
| 165 | 160 | try { |
| 166 | 161 | $response = Request::get($this->clientConfigurationManager->getFedoraHost() . "/fedora/management/getNextPID?numPIDs=1&namespace=qucosa&xml=true") |
@@ -191,8 +186,7 @@ discard block |
||
| 191 | 186 | * @param $state |
| 192 | 187 | * @return boolean |
| 193 | 188 | */ |
| 194 | - public function delete($document, $state) |
|
| 195 | - { |
|
| 189 | + public function delete($document, $state) { |
|
| 196 | 190 | |
| 197 | 191 | $remoteId = $document->getObjectIdentifier(); |
| 198 | 192 | |
@@ -225,8 +219,7 @@ discard block |
||
| 225 | 219 | * @param \Httpful\Response $response |
| 226 | 220 | * @return string |
| 227 | 221 | */ |
| 228 | - protected function getRemoteDocumentId($response) |
|
| 229 | - { |
|
| 222 | + protected function getRemoteDocumentId($response) { |
|
| 230 | 223 | |
| 231 | 224 | // Get repository ID and write into document |
| 232 | 225 | $responseDom = new \DOMDocument(); |
@@ -243,8 +236,7 @@ discard block |
||
| 243 | 236 | return null; |
| 244 | 237 | } |
| 245 | 238 | |
| 246 | - protected function getOwnerId() |
|
| 247 | - { |
|
| 239 | + protected function getOwnerId() { |
|
| 248 | 240 | $ownerId = $this->clientConfigurationManager->getOwnerId(); |
| 249 | 241 | if (empty($ownerId)) { |
| 250 | 242 | throw new \Exception('Owner id can not be empty or null!'); |
@@ -253,8 +245,7 @@ discard block |
||
| 253 | 245 | return $ownerId; |
| 254 | 246 | } |
| 255 | 247 | |
| 256 | - protected function getSWORDCollection() |
|
| 257 | - { |
|
| 248 | + protected function getSWORDCollection() { |
|
| 258 | 249 | return $this->clientConfigurationManager->getSwordCollectionNamespace(); |
| 259 | 250 | } |
| 260 | 251 | |
@@ -78,15 +78,15 @@ discard block |
||
| 78 | 78 | if (!$response->hasErrors() && $response->code == 201) { |
| 79 | 79 | return $this->getRemoteDocumentId($response); |
| 80 | 80 | } else { |
| 81 | - TransferLogger::Log('INGEST', $document->getUid(), null, $response); |
|
| 81 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $response); |
|
| 82 | 82 | } |
| 83 | 83 | } catch (Exception $exception) { |
| 84 | 84 | // curl error handling, |
| 85 | 85 | // but extbase already catches all exceptions |
| 86 | - return null; |
|
| 86 | + return NULL; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - return null; |
|
| 89 | + return NULL; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } catch (Exception $exception) { |
| 120 | 120 | // curl error handling, |
| 121 | 121 | // but extbase already catches all exceptions |
| 122 | - return null; |
|
| 122 | + return NULL; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
@@ -142,15 +142,15 @@ discard block |
||
| 142 | 142 | if (!$response->hasErrors() && $response->code == 200) { |
| 143 | 143 | return $response->__toString(); |
| 144 | 144 | } else { |
| 145 | - TransferLogger::Log('RETRIEVE', null, $remoteId, $response); |
|
| 145 | + TransferLogger::Log('RETRIEVE', NULL, $remoteId, $response); |
|
| 146 | 146 | } |
| 147 | 147 | } catch (Exception $exception) { |
| 148 | 148 | // curl error handling, |
| 149 | 149 | // but extbase already catches all exceptions |
| 150 | - return null; |
|
| 150 | + return NULL; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - return null; |
|
| 153 | + return NULL; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -173,15 +173,15 @@ discard block |
||
| 173 | 173 | if (!$response->hasErrors() && $response->code == 200) { |
| 174 | 174 | return $response->__toString(); |
| 175 | 175 | } else { |
| 176 | - TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, $remoteId, $response); |
|
| 176 | + TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, $remoteId, $response); |
|
| 177 | 177 | } |
| 178 | 178 | } catch (\Exception $exception) { |
| 179 | 179 | // curl error handling, |
| 180 | 180 | // but extbase already catches all exceptions |
| 181 | - return null; |
|
| 181 | + return NULL; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - return null; |
|
| 184 | + return NULL; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
@@ -206,17 +206,17 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | // if transfer successful |
| 208 | 208 | if (!$response->hasErrors() && $response->code == 204) { |
| 209 | - return true; |
|
| 209 | + return TRUE; |
|
| 210 | 210 | } else { |
| 211 | 211 | TransferLogger::Log('DELETE', $document->getUid(), $remoteId, $response); |
| 212 | 212 | } |
| 213 | 213 | } catch (Exception $exception) { |
| 214 | 214 | // curl error handling, |
| 215 | 215 | // but extbase already catches all exceptions |
| 216 | - return false; |
|
| 216 | + return FALSE; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - return false; |
|
| 219 | + return FALSE; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | return $objectIdentifier; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - return null; |
|
| 243 | + return NULL; |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | 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 | } |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | return json_encode( |
| 173 | - array( |
|
| 173 | + array ( |
|
| 174 | 174 | 'qucosaId' => $qucosaId, |
| 175 | 175 | 'value' => $urn, |
| 176 | 176 | ) |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository |
| 27 | 27 | * @inject |
| 28 | 28 | */ |
| 29 | - protected $metadataGroupRepository = null; |
|
| 29 | + protected $metadataGroupRepository = NULL; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * metadataObjectRepository |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository |
| 35 | 35 | * @inject |
| 36 | 36 | */ |
| 37 | - protected $metadataObjectRepository = null; |
|
| 37 | + protected $metadataObjectRepository = NULL; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * DocumentFormController |
| 23 | 23 | */ |
| 24 | -class AjaxDocumentFormController extends \EWW\Dpf\Controller\AbstractController |
|
| 25 | -{ |
|
| 24 | +class AjaxDocumentFormController extends \EWW\Dpf\Controller\AbstractController { |
|
| 26 | 25 | |
| 27 | 26 | /** |
| 28 | 27 | * metadataGroupRepository |
@@ -47,8 +46,7 @@ discard block |
||
| 47 | 46 | * @param integer $groupIndex |
| 48 | 47 | * @return void |
| 49 | 48 | */ |
| 50 | - public function groupAction($pageUid, $groupUid, $groupIndex) |
|
| 51 | - { |
|
| 49 | + public function groupAction($pageUid, $groupUid, $groupIndex) { |
|
| 52 | 50 | |
| 53 | 51 | $group = $this->metadataGroupRepository->findByUid($groupUid); |
| 54 | 52 | |
@@ -91,8 +89,7 @@ discard block |
||
| 91 | 89 | * @param integer $fieldIndex |
| 92 | 90 | * @return void |
| 93 | 91 | */ |
| 94 | - public function fieldAction($pageUid, $groupUid, $groupIndex, $fieldUid, $fieldIndex) |
|
| 95 | - { |
|
| 92 | + public function fieldAction($pageUid, $groupUid, $groupIndex, $fieldUid, $fieldIndex) { |
|
| 96 | 93 | |
| 97 | 94 | $field = $this->metadataObjectRepository->findByUid($fieldUid); |
| 98 | 95 | |
@@ -123,8 +120,7 @@ discard block |
||
| 123 | 120 | * |
| 124 | 121 | * @return void |
| 125 | 122 | */ |
| 126 | - public function primaryUploadAction($groupIndex) |
|
| 127 | - { |
|
| 123 | + public function primaryUploadAction($groupIndex) { |
|
| 128 | 124 | } |
| 129 | 125 | |
| 130 | 126 | /** |
@@ -132,8 +128,7 @@ discard block |
||
| 132 | 128 | * @param integer $groupIndex |
| 133 | 129 | * @return void |
| 134 | 130 | */ |
| 135 | - public function secondaryUploadAction($groupIndex) |
|
| 136 | - { |
|
| 131 | + public function secondaryUploadAction($groupIndex) { |
|
| 137 | 132 | $this->view->assign('groupIndex', $groupIndex); |
| 138 | 133 | //$this->view->assign('displayName','Sekundärdatei'); |
| 139 | 134 | } |
@@ -144,8 +139,7 @@ discard block |
||
| 144 | 139 | * @param integer $isPrimary |
| 145 | 140 | * @return void |
| 146 | 141 | */ |
| 147 | - public function deleteFileAction($fileUid, $isPrimary = 0) |
|
| 148 | - { |
|
| 142 | + public function deleteFileAction($fileUid, $isPrimary = 0) { |
|
| 149 | 143 | $this->view->assign('fileUid', $fileUid); |
| 150 | 144 | $this->view->assign('isPrimary', $isPrimary); |
| 151 | 145 | } |
@@ -155,8 +149,7 @@ discard block |
||
| 155 | 149 | * @param string $qucosaId |
| 156 | 150 | * @return string |
| 157 | 151 | */ |
| 158 | - public function fillOutAction($qucosaId) |
|
| 159 | - { |
|
| 152 | + public function fillOutAction($qucosaId) { |
|
| 160 | 153 | |
| 161 | 154 | $urnService = $this->objectManager->get(Urn::class); |
| 162 | 155 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_discard.success'; |
| 162 | 162 | |
| 163 | - $args = array(); |
|
| 163 | + $args = array (); |
|
| 164 | 164 | |
| 165 | 165 | $message = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, 'dpf', $args); |
| 166 | 166 | $message = empty($message) ? "" : $message; |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) |
| 180 | 180 | { |
| 181 | 181 | |
| 182 | - $args = array(); |
|
| 182 | + $args = array (); |
|
| 183 | 183 | |
| 184 | 184 | $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_duplicate.success'; |
| 185 | 185 | $message = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, 'dpf', $args); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * DocumentController |
| 28 | 28 | */ |
| 29 | -class DocumentController extends \EWW\Dpf\Controller\AbstractController |
|
| 30 | -{ |
|
| 29 | +class DocumentController extends \EWW\Dpf\Controller\AbstractController { |
|
| 31 | 30 | |
| 32 | 31 | /** |
| 33 | 32 | * documentRepository |
@@ -50,8 +49,7 @@ discard block |
||
| 50 | 49 | * |
| 51 | 50 | * @return void |
| 52 | 51 | */ |
| 53 | - public function listAction() |
|
| 54 | - { |
|
| 52 | + public function listAction() { |
|
| 55 | 53 | $documents = $this->documentRepository->findAll(); |
| 56 | 54 | |
| 57 | 55 | if ($this->request->hasArgument('message')) { |
@@ -65,14 +63,12 @@ discard block |
||
| 65 | 63 | $this->view->assign('documents', $documents); |
| 66 | 64 | } |
| 67 | 65 | |
| 68 | - public function listNewAction() |
|
| 69 | - { |
|
| 66 | + public function listNewAction() { |
|
| 70 | 67 | $documents = $this->documentRepository->getNewDocuments(); |
| 71 | 68 | $this->view->assign('documents', $documents); |
| 72 | 69 | } |
| 73 | 70 | |
| 74 | - public function listEditAction() |
|
| 75 | - { |
|
| 71 | + public function listEditAction() { |
|
| 76 | 72 | $documents = $this->documentRepository->getInProgressDocuments(); |
| 77 | 73 | $this->view->assign('documents', $documents); |
| 78 | 74 | } |
@@ -83,8 +79,7 @@ discard block |
||
| 83 | 79 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 84 | 80 | * @return void |
| 85 | 81 | */ |
| 86 | - public function showAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 87 | - { |
|
| 82 | + public function showAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 88 | 83 | |
| 89 | 84 | $this->view->assign('document', $document); |
| 90 | 85 | } |
@@ -96,8 +91,7 @@ discard block |
||
| 96 | 91 | * @ignorevalidation $newDocument |
| 97 | 92 | * @return void |
| 98 | 93 | */ |
| 99 | - public function newAction(\EWW\Dpf\Domain\Model\Document $newDocument = null) |
|
| 100 | - { |
|
| 94 | + public function newAction(\EWW\Dpf\Domain\Model\Document $newDocument = null) { |
|
| 101 | 95 | |
| 102 | 96 | $this->view->assign('newDocument', $newDocument); |
| 103 | 97 | } |
@@ -108,8 +102,7 @@ discard block |
||
| 108 | 102 | * @param \EWW\Dpf\Domain\Model\Document $newDocument |
| 109 | 103 | * @return void |
| 110 | 104 | */ |
| 111 | - public function createAction(\EWW\Dpf\Domain\Model\Document $newDocument) |
|
| 112 | - { |
|
| 105 | + public function createAction(\EWW\Dpf\Domain\Model\Document $newDocument) { |
|
| 113 | 106 | |
| 114 | 107 | $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); |
| 115 | 108 | $this->documentRepository->add($newDocument); |
@@ -123,8 +116,7 @@ discard block |
||
| 123 | 116 | * @ignorevalidation $document |
| 124 | 117 | * @return void |
| 125 | 118 | */ |
| 126 | - public function editAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 127 | - { |
|
| 119 | + public function editAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 128 | 120 | $this->view->assign('document', $document); |
| 129 | 121 | } |
| 130 | 122 | |
@@ -134,8 +126,7 @@ discard block |
||
| 134 | 126 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 135 | 127 | * @return void |
| 136 | 128 | */ |
| 137 | - public function updateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 138 | - { |
|
| 129 | + public function updateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 139 | 130 | $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); |
| 140 | 131 | $this->documentRepository->update($document); |
| 141 | 132 | $this->redirect('list'); |
@@ -147,8 +138,7 @@ discard block |
||
| 147 | 138 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 148 | 139 | * @return void |
| 149 | 140 | */ |
| 150 | - public function discardConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 151 | - { |
|
| 141 | + public function discardConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 152 | 142 | $this->view->assign('document', $document); |
| 153 | 143 | } |
| 154 | 144 | |
@@ -158,8 +148,7 @@ discard block |
||
| 158 | 148 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 159 | 149 | * @return void |
| 160 | 150 | */ |
| 161 | - public function discardAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 162 | - { |
|
| 151 | + public function discardAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 163 | 152 | // remove document from local index |
| 164 | 153 | $elasticsearchRepository = $this->objectManager->get(ElasticsearchRepository::class); |
| 165 | 154 | // send document to index |
@@ -185,8 +174,7 @@ discard block |
||
| 185 | 174 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 186 | 175 | * @return void |
| 187 | 176 | */ |
| 188 | - public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 189 | - { |
|
| 177 | + public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 190 | 178 | |
| 191 | 179 | $args = array(); |
| 192 | 180 | |
@@ -236,8 +224,7 @@ discard block |
||
| 236 | 224 | * @param string $releaseType |
| 237 | 225 | * @return void |
| 238 | 226 | */ |
| 239 | - public function releaseConfirmAction(\EWW\Dpf\Domain\Model\Document $document, $releaseType) |
|
| 240 | - { |
|
| 227 | + public function releaseConfirmAction(\EWW\Dpf\Domain\Model\Document $document, $releaseType) { |
|
| 241 | 228 | $this->view->assign('releaseType', $releaseType); |
| 242 | 229 | $this->view->assign('document', $document); |
| 243 | 230 | } |
@@ -248,8 +235,7 @@ discard block |
||
| 248 | 235 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 249 | 236 | * @return void |
| 250 | 237 | */ |
| 251 | - public function releaseAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 252 | - { |
|
| 238 | + public function releaseAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 253 | 239 | |
| 254 | 240 | // generate URN if needed |
| 255 | 241 | $qucosaId = $document->getObjectIdentifier(); |
@@ -317,8 +303,7 @@ discard block |
||
| 317 | 303 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 318 | 304 | * @return void |
| 319 | 305 | */ |
| 320 | - public function restoreConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 321 | - { |
|
| 306 | + public function restoreConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 322 | 307 | $this->view->assign('document', $document); |
| 323 | 308 | } |
| 324 | 309 | |
@@ -328,8 +313,7 @@ discard block |
||
| 328 | 313 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 329 | 314 | * @return void |
| 330 | 315 | */ |
| 331 | - public function restoreAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 332 | - { |
|
| 316 | + public function restoreAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 333 | 317 | |
| 334 | 318 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 335 | 319 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -354,8 +338,7 @@ discard block |
||
| 354 | 338 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 355 | 339 | * @return void |
| 356 | 340 | */ |
| 357 | - public function deleteConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 358 | - { |
|
| 341 | + public function deleteConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 359 | 342 | $this->view->assign('document', $document); |
| 360 | 343 | } |
| 361 | 344 | |
@@ -365,8 +348,7 @@ discard block |
||
| 365 | 348 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 366 | 349 | * @return void |
| 367 | 350 | */ |
| 368 | - public function deleteAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 369 | - { |
|
| 351 | + public function deleteAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 370 | 352 | |
| 371 | 353 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 372 | 354 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -391,8 +373,7 @@ discard block |
||
| 391 | 373 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 392 | 374 | * @return void |
| 393 | 375 | */ |
| 394 | - public function activateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 395 | - { |
|
| 376 | + public function activateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 396 | 377 | $this->view->assign('document', $document); |
| 397 | 378 | } |
| 398 | 379 | |
@@ -402,8 +383,7 @@ discard block |
||
| 402 | 383 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 403 | 384 | * @return void |
| 404 | 385 | */ |
| 405 | - public function activateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 406 | - { |
|
| 386 | + public function activateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 407 | 387 | |
| 408 | 388 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 409 | 389 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -428,8 +408,7 @@ discard block |
||
| 428 | 408 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 429 | 409 | * @return void |
| 430 | 410 | */ |
| 431 | - public function inactivateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 432 | - { |
|
| 411 | + public function inactivateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 433 | 412 | $this->view->assign('document', $document); |
| 434 | 413 | } |
| 435 | 414 | |
@@ -439,8 +418,7 @@ discard block |
||
| 439 | 418 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 440 | 419 | * @return void |
| 441 | 420 | */ |
| 442 | - public function inactivateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 443 | - { |
|
| 421 | + public function inactivateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 444 | 422 | |
| 445 | 423 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 446 | 424 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -459,8 +437,7 @@ discard block |
||
| 459 | 437 | $this->redirect('list'); |
| 460 | 438 | } |
| 461 | 439 | |
| 462 | - protected function getStoragePID() |
|
| 463 | - { |
|
| 440 | + protected function getStoragePID() { |
|
| 464 | 441 | return $this->settings['persistence']['classes']['EWW\Dpf\Domain\Model\Document']['newRecordStoragePid']; |
| 465 | 442 | } |
| 466 | 443 | |
@@ -470,8 +447,7 @@ discard block |
||
| 470 | 447 | * @param string $key |
| 471 | 448 | * @param string $severity |
| 472 | 449 | */ |
| 473 | - protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity) |
|
| 474 | - { |
|
| 450 | + protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity) { |
|
| 475 | 451 | |
| 476 | 452 | // Show success or failure of the action in a flash message |
| 477 | 453 | $args[] = $document->getTitle(); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @var \EWW\Dpf\Domain\Repository\DocumentRepository |
| 36 | 36 | * @inject |
| 37 | 37 | */ |
| 38 | - protected $documentRepository = null; |
|
| 38 | + protected $documentRepository = NULL; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * persistence manager |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * @ignorevalidation $newDocument |
| 97 | 97 | * @return void |
| 98 | 98 | */ |
| 99 | - public function newAction(\EWW\Dpf\Domain\Model\Document $newDocument = null) |
|
| 99 | + public function newAction(\EWW\Dpf\Domain\Model\Document $newDocument = NULL) |
|
| 100 | 100 | { |
| 101 | 101 | $this->view->assign('newDocument', $newDocument); |
| 102 | 102 | } |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | $message, |
| 484 | 484 | '', |
| 485 | 485 | $severity, |
| 486 | - true |
|
| 486 | + TRUE |
|
| 487 | 487 | ); |
| 488 | 488 | |
| 489 | 489 | } |