@@ -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 |
@@ -172,26 +172,26 @@ discard block |
||
| 172 | 172 | $xmlData = $modsWrap->firstChild->firstChild->firstChild->firstChild; |
| 173 | 173 | |
| 174 | 174 | // import mods into mets |
| 175 | - $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, true); |
|
| 175 | + $nodeAppendModsData = $modsWrap->importNode($this->modsData->firstChild, TRUE); |
|
| 176 | 176 | $xmlData->appendChild($nodeAppendModsData); |
| 177 | 177 | |
| 178 | 178 | // add SLUB data |
| 179 | - $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, true); |
|
| 179 | + $nodeAppendModsData = $modsWrap->importNode($this->buildMetsSlub()->firstChild, TRUE); |
|
| 180 | 180 | $modsWrap->firstChild->appendChild($nodeAppendModsData); |
| 181 | 181 | |
| 182 | 182 | if ($fileSection) { |
| 183 | 183 | // add filesection |
| 184 | - $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, true); |
|
| 184 | + $nodeAppendModsData = $modsWrap->importNode($fileSection->firstChild->firstChild, TRUE); |
|
| 185 | 185 | $modsWrap->firstChild->appendChild($nodeAppendModsData); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | if ($structureMap) { |
| 189 | 189 | // add structure map |
| 190 | - $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, true); |
|
| 190 | + $nodeAppendModsData = $modsWrap->importNode($structureMap->firstChild->firstChild, TRUE); |
|
| 191 | 191 | $modsWrap->firstChild->appendChild($nodeAppendModsData); |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - $modsWrap->formatOutput = true; |
|
| 194 | + $modsWrap->formatOutput = TRUE; |
|
| 195 | 195 | $modsWrap->encoding = 'UTF-8'; |
| 196 | 196 | |
| 197 | 197 | $this->metsData = $modsWrap; |
@@ -253,28 +253,28 @@ discard block |
||
| 253 | 253 | $attributeXPath .= '[@ID="QUCOSA_' . $counter . '"]'; |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | - $existsExtensionFlag = false; |
|
| 256 | + $existsExtensionFlag = FALSE; |
|
| 257 | 257 | $i = 0; |
| 258 | 258 | // loop each object |
| 259 | 259 | if (!empty($values)) { |
| 260 | 260 | foreach ($values as $value) { |
| 261 | 261 | |
| 262 | 262 | if ($value['modsExtension']) { |
| 263 | - $existsExtensionFlag = true; |
|
| 263 | + $existsExtensionFlag = TRUE; |
|
| 264 | 264 | // mods extension |
| 265 | 265 | $counter = sprintf("%'03d", $this->counter); |
| 266 | 266 | $referenceAttribute = $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]'; |
| 267 | 267 | |
| 268 | 268 | $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping']; |
| 269 | 269 | |
| 270 | - $xml = $this->customXPath($path, false, $value['value']); |
|
| 270 | + $xml = $this->customXPath($path, FALSE, $value['value']); |
|
| 271 | 271 | } else { |
| 272 | 272 | $path = $mapping . $attributeXPath . '%/' . $value['mapping']; |
| 273 | 273 | |
| 274 | 274 | if ($i == 0) { |
| 275 | - $newGroupFlag = true; |
|
| 275 | + $newGroupFlag = TRUE; |
|
| 276 | 276 | } else { |
| 277 | - $newGroupFlag = false; |
|
| 277 | + $newGroupFlag = FALSE; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | $xml = $this->customXPath($path, $newGroupFlag, $value['value']); |
@@ -286,12 +286,12 @@ discard block |
||
| 286 | 286 | } else { |
| 287 | 287 | if (!empty($attributeXPath)) { |
| 288 | 288 | $path = $mapping . $attributeXPath; |
| 289 | - $xml = $this->customXPath($path, true, '', true); |
|
| 289 | + $xml = $this->customXPath($path, TRUE, '', TRUE); |
|
| 290 | 290 | } |
| 291 | 291 | } |
| 292 | 292 | if (!$existsExtensionFlag && $group['modsExtensionMapping']) { |
| 293 | 293 | $xPath = $group['modsExtensionMapping'] . $extensionAttribute . '[@' . $group['modsExtensionReference'] . '="QUCOSA_' . $counter . '"]'; |
| 294 | - $xml = $this->customXPath($xPath, true, '', true); |
|
| 294 | + $xml = $this->customXPath($xPath, TRUE, '', TRUE); |
|
| 295 | 295 | } |
| 296 | 296 | if ($group['modsExtensionMapping']) { |
| 297 | 297 | $this->counter++; |
@@ -321,13 +321,13 @@ discard block |
||
| 321 | 321 | * @param string $value form value |
| 322 | 322 | * @return xml created xml |
| 323 | 323 | */ |
| 324 | - public function customXPath($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) |
|
| 324 | + public function customXPath($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE) |
|
| 325 | 325 | { |
| 326 | 326 | if (!$attributeOnly) { |
| 327 | 327 | // Explode xPath |
| 328 | 328 | $newPath = explode('%', $xPath); |
| 329 | 329 | |
| 330 | - $praedicateFlag = false; |
|
| 330 | + $praedicateFlag = FALSE; |
|
| 331 | 331 | $explodedXPath = explode('[', $newPath[0]); |
| 332 | 332 | if (count($explodedXPath) > 1) { |
| 333 | 333 | // praedicate is given |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | $path = $explodedXPath[0]; |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | - $praedicateFlag = true; |
|
| 342 | + $praedicateFlag = TRUE; |
|
| 343 | 343 | } else { |
| 344 | 344 | $path = $newPath[0]; |
| 345 | 345 | } |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | $nodeList = $xPath->query('/mods:mods' . $match[1]); |
| 390 | 390 | $node = $nodeList->item(0); |
| 391 | 391 | |
| 392 | - $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true); |
|
| 392 | + $importNode = $docXML->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE); |
|
| 393 | 393 | |
| 394 | 394 | $node->appendChild($importNode); |
| 395 | 395 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | |
| 401 | 401 | $node = $domNodeList->item(0)->firstChild; |
| 402 | 402 | |
| 403 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 403 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 404 | 404 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 405 | 405 | } else { |
| 406 | 406 | // first xpath doesn't exist |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | $nodeList = $xPath->query('/mods:mods/' . $path . $match[1]); |
| 449 | 449 | $node = $nodeList->item(0); |
| 450 | 450 | |
| 451 | - $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, true); |
|
| 451 | + $importNode = $doc2->importNode($docXMLNested->getElementsByTagName("mods")->item(0)->firstChild, TRUE); |
|
| 452 | 452 | |
| 453 | 453 | $node->appendChild($importNode); |
| 454 | 454 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | $domNode2 = $domXPath2->query('/mods:mods/' . $path)->item(0)->childNodes->item(0); |
| 457 | 457 | |
| 458 | 458 | // merge xml nodes |
| 459 | - $nodeToBeAppended = $doc1->importNode($domNode2, true); |
|
| 459 | + $nodeToBeAppended = $doc1->importNode($domNode2, TRUE); |
|
| 460 | 460 | |
| 461 | 461 | $domNode->item(0)->appendChild($nodeToBeAppended); |
| 462 | 462 | |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | $firstChild = $this->xmlData->firstChild; |
| 466 | 466 | $firstItem = $doc1->getElementsByTagName('mods')->item(0)->firstChild; |
| 467 | 467 | |
| 468 | - $nodeAppendModsData = $this->xmlData->importNode($firstItem, true); |
|
| 468 | + $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE); |
|
| 469 | 469 | $firstChild->appendChild($nodeAppendModsData); |
| 470 | 470 | |
| 471 | 471 | return $doc1->saveXML(); |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | |
| 485 | 485 | $node = $domNodeList->item(0)->firstChild; |
| 486 | 486 | |
| 487 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 487 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 488 | 488 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 489 | 489 | |
| 490 | 490 | return $docXML->saveXML(); |
@@ -493,13 +493,13 @@ discard block |
||
| 493 | 493 | return $this->xmlData->saveXML(); |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | - public function customXPathSlub($xPath, $newGroupFlag = false, $value = '', $attributeOnly = false) |
|
| 496 | + public function customXPathSlub($xPath, $newGroupFlag = FALSE, $value = '', $attributeOnly = FALSE) |
|
| 497 | 497 | { |
| 498 | 498 | if (!$attributeOnly) { |
| 499 | 499 | // Explode xPath |
| 500 | 500 | $newPath = explode('%', $xPath); |
| 501 | 501 | |
| 502 | - $praedicateFlag = false; |
|
| 502 | + $praedicateFlag = FALSE; |
|
| 503 | 503 | $explodedXPath = explode('[', $newPath[0]); |
| 504 | 504 | if (count($explodedXPath) > 1) { |
| 505 | 505 | // praedicate is given |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | $path = $explodedXPath[0]; |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | - $praedicateFlag = true; |
|
| 514 | + $praedicateFlag = TRUE; |
|
| 515 | 515 | } else { |
| 516 | 516 | $path = $newPath[0]; |
| 517 | 517 | } |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | |
| 539 | 539 | $node = $domNodeList->item(0)->firstChild; |
| 540 | 540 | |
| 541 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 541 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 542 | 542 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 543 | 543 | } else { |
| 544 | 544 | // first xpath doesn't exist |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | $domNode2 = $domXPath2->query('/slub:info/' . $path)->item(0)->childNodes->item(0); |
| 568 | 568 | |
| 569 | 569 | // merge xml nodes |
| 570 | - $nodeToBeAppended = $doc1->importNode($domNode2, true); |
|
| 570 | + $nodeToBeAppended = $doc1->importNode($domNode2, TRUE); |
|
| 571 | 571 | |
| 572 | 572 | $domNode->item(0)->appendChild($nodeToBeAppended); |
| 573 | 573 | |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | $firstChild = $this->xmlData->firstChild; |
| 578 | 578 | $firstItem = $doc1->getElementsByTagName('info')->item(0)->firstChild; |
| 579 | 579 | |
| 580 | - $nodeAppendModsData = $this->xmlData->importNode($firstItem, true); |
|
| 580 | + $nodeAppendModsData = $this->xmlData->importNode($firstItem, TRUE); |
|
| 581 | 581 | $firstChild->appendChild($nodeAppendModsData); |
| 582 | 582 | |
| 583 | 583 | return $doc1->saveXML(); |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | |
| 597 | 597 | $node = $domNodeList->item(0)->firstChild; |
| 598 | 598 | |
| 599 | - $nodeAppendModsData = $this->xmlData->importNode($node, true); |
|
| 599 | + $nodeAppendModsData = $this->xmlData->importNode($node, TRUE); |
|
| 600 | 600 | $domNode->item($domNode->length - 1)->appendChild($nodeAppendModsData); |
| 601 | 601 | |
| 602 | 602 | return $docXML->saveXML(); |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | $second = $this->slubData; |
| 847 | 847 | |
| 848 | 848 | foreach ($second->childNodes as $node) { |
| 849 | - $importNode = $domDocument->importNode($node, true); |
|
| 849 | + $importNode = $domDocument->importNode($node, TRUE); |
|
| 850 | 850 | $domWrapElement->appendChild($importNode); |
| 851 | 851 | } |
| 852 | 852 | |
@@ -902,14 +902,14 @@ discard block |
||
| 902 | 902 | |
| 903 | 903 | $path = $group['modsExtensionMapping'] . $referenceAttribute . '%/' . $value['mapping']; |
| 904 | 904 | |
| 905 | - $xml = $this->customXPathSlub($path, false, $value['value']); |
|
| 905 | + $xml = $this->customXPathSlub($path, FALSE, $value['value']); |
|
| 906 | 906 | } else { |
| 907 | 907 | $path = $mapping . $attributeXPath . '%/' . $value['mapping']; |
| 908 | 908 | |
| 909 | 909 | if ($i == 0) { |
| 910 | - $newGroupFlag = true; |
|
| 910 | + $newGroupFlag = TRUE; |
|
| 911 | 911 | } else { |
| 912 | - $newGroupFlag = false; |
|
| 912 | + $newGroupFlag = FALSE; |
|
| 913 | 913 | } |
| 914 | 914 | |
| 915 | 915 | $xml = $this->customXPathSlub($path, $newGroupFlag, $value['value']); |
@@ -922,7 +922,7 @@ discard block |
||
| 922 | 922 | } else { |
| 923 | 923 | if (!empty($attributeXPath)) { |
| 924 | 924 | $path = $mapping . $attributeXPath; |
| 925 | - $xml = $this->customXPathSlub($path, true, '', true); |
|
| 925 | + $xml = $this->customXPathSlub($path, TRUE, '', TRUE); |
|
| 926 | 926 | } |
| 927 | 927 | } |
| 928 | 928 | |
@@ -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 | } |
@@ -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 discardConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 87 | - { |
|
| 82 | + public function discardConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 88 | 83 | $this->view->assign('document', $document); |
| 89 | 84 | } |
| 90 | 85 | |
@@ -94,8 +89,7 @@ discard block |
||
| 94 | 89 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 95 | 90 | * @return void |
| 96 | 91 | */ |
| 97 | - public function discardAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 98 | - { |
|
| 92 | + public function discardAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 99 | 93 | // remove document from local index |
| 100 | 94 | $elasticsearchRepository = $this->objectManager->get(ElasticsearchRepository::class); |
| 101 | 95 | // send document to index |
@@ -121,8 +115,7 @@ discard block |
||
| 121 | 115 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 122 | 116 | * @return void |
| 123 | 117 | */ |
| 124 | - public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 125 | - { |
|
| 118 | + public function duplicateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 126 | 119 | |
| 127 | 120 | $args = array(); |
| 128 | 121 | |
@@ -172,8 +165,7 @@ discard block |
||
| 172 | 165 | * @param string $releaseType |
| 173 | 166 | * @return void |
| 174 | 167 | */ |
| 175 | - public function releaseConfirmAction(\EWW\Dpf\Domain\Model\Document $document, $releaseType) |
|
| 176 | - { |
|
| 168 | + public function releaseConfirmAction(\EWW\Dpf\Domain\Model\Document $document, $releaseType) { |
|
| 177 | 169 | $this->view->assign('releaseType', $releaseType); |
| 178 | 170 | $this->view->assign('document', $document); |
| 179 | 171 | } |
@@ -184,8 +176,7 @@ discard block |
||
| 184 | 176 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 185 | 177 | * @return void |
| 186 | 178 | */ |
| 187 | - public function releaseAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 188 | - { |
|
| 179 | + public function releaseAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 189 | 180 | |
| 190 | 181 | // generate URN if needed |
| 191 | 182 | $qucosaId = $document->getObjectIdentifier(); |
@@ -253,8 +244,7 @@ discard block |
||
| 253 | 244 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 254 | 245 | * @return void |
| 255 | 246 | */ |
| 256 | - public function restoreConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 257 | - { |
|
| 247 | + public function restoreConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 258 | 248 | $this->view->assign('document', $document); |
| 259 | 249 | } |
| 260 | 250 | |
@@ -264,8 +254,7 @@ discard block |
||
| 264 | 254 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 265 | 255 | * @return void |
| 266 | 256 | */ |
| 267 | - public function restoreAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 268 | - { |
|
| 257 | + public function restoreAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 269 | 258 | |
| 270 | 259 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 271 | 260 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -290,8 +279,7 @@ discard block |
||
| 290 | 279 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 291 | 280 | * @return void |
| 292 | 281 | */ |
| 293 | - public function deleteConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 294 | - { |
|
| 282 | + public function deleteConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 295 | 283 | $this->view->assign('document', $document); |
| 296 | 284 | } |
| 297 | 285 | |
@@ -301,8 +289,7 @@ discard block |
||
| 301 | 289 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 302 | 290 | * @return void |
| 303 | 291 | */ |
| 304 | - public function deleteAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 305 | - { |
|
| 292 | + public function deleteAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 306 | 293 | |
| 307 | 294 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 308 | 295 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -327,8 +314,7 @@ discard block |
||
| 327 | 314 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 328 | 315 | * @return void |
| 329 | 316 | */ |
| 330 | - public function activateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 331 | - { |
|
| 317 | + public function activateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 332 | 318 | $this->view->assign('document', $document); |
| 333 | 319 | } |
| 334 | 320 | |
@@ -338,8 +324,7 @@ discard block |
||
| 338 | 324 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 339 | 325 | * @return void |
| 340 | 326 | */ |
| 341 | - public function activateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 342 | - { |
|
| 327 | + public function activateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 343 | 328 | |
| 344 | 329 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 345 | 330 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -364,8 +349,7 @@ discard block |
||
| 364 | 349 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 365 | 350 | * @return void |
| 366 | 351 | */ |
| 367 | - public function inactivateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 368 | - { |
|
| 352 | + public function inactivateConfirmAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 369 | 353 | $this->view->assign('document', $document); |
| 370 | 354 | } |
| 371 | 355 | |
@@ -375,8 +359,7 @@ discard block |
||
| 375 | 359 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 376 | 360 | * @return void |
| 377 | 361 | */ |
| 378 | - public function inactivateAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 379 | - { |
|
| 362 | + public function inactivateAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 380 | 363 | |
| 381 | 364 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 382 | 365 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
@@ -395,8 +378,7 @@ discard block |
||
| 395 | 378 | $this->redirect('list'); |
| 396 | 379 | } |
| 397 | 380 | |
| 398 | - protected function getStoragePID() |
|
| 399 | - { |
|
| 381 | + protected function getStoragePID() { |
|
| 400 | 382 | return $this->settings['persistence']['classes']['EWW\Dpf\Domain\Model\Document']['newRecordStoragePid']; |
| 401 | 383 | } |
| 402 | 384 | |
@@ -406,8 +388,7 @@ discard block |
||
| 406 | 388 | * @param string $key |
| 407 | 389 | * @param string $severity |
| 408 | 390 | */ |
| 409 | - protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity) |
|
| 410 | - { |
|
| 391 | + protected function flashMessage(\EWW\Dpf\Domain\Model\Document $document, $key, $severity) { |
|
| 411 | 392 | |
| 412 | 393 | // Show success or failure of the action in a flash message |
| 413 | 394 | $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 |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | $message, |
| 421 | 421 | '', |
| 422 | 422 | $severity, |
| 423 | - true |
|
| 423 | + TRUE |
|
| 424 | 424 | ); |
| 425 | 425 | |
| 426 | 426 | } |
@@ -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); |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | protected function redirectToList($message = null) |
| 27 | 27 | { |
| 28 | - $this->redirect('list', 'Document', null, array('message' => $message)); |
|
| 28 | + $this->redirect('list', 'Document', null, array ('message' => $message)); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - protected function redirectToList($message = null) |
|
| 26 | + protected function redirectToList($message = NULL) |
|
| 27 | 27 | { |
| 28 | - $this->redirect('list', 'Document', null, array('message' => $message)); |
|
| 28 | + $this->redirect('list', 'Document', NULL, array('message' => $message)); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -16,17 +16,14 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | use EWW\Dpf\Services\Transfer\ElasticsearchRepository; |
| 18 | 18 | |
| 19 | -class DocumentFormBEController extends AbstractDocumentFormController |
|
| 20 | -{ |
|
| 19 | +class DocumentFormBEController extends AbstractDocumentFormController { |
|
| 21 | 20 | |
| 22 | - public function __construct() |
|
| 23 | - { |
|
| 21 | + public function __construct() { |
|
| 24 | 22 | parent::__construct(); |
| 25 | 23 | |
| 26 | 24 | } |
| 27 | 25 | |
| 28 | - protected function redirectToList($message = null) |
|
| 29 | - { |
|
| 26 | + protected function redirectToList($message = null) { |
|
| 30 | 27 | $this->redirect('list', 'Document', null, array('message' => $message)); |
| 31 | 28 | } |
| 32 | 29 | |
@@ -36,8 +33,7 @@ discard block |
||
| 36 | 33 | * @param array $documentData |
| 37 | 34 | * @throws \Exception |
| 38 | 35 | */ |
| 39 | - public function deleteAction($documentData) |
|
| 40 | - { |
|
| 36 | + public function deleteAction($documentData) { |
|
| 41 | 37 | |
| 42 | 38 | if (!$GLOBALS['BE_USER']) { |
| 43 | 39 | throw new \Exception('Access denied'); |
@@ -55,8 +51,7 @@ discard block |
||
| 55 | 51 | $this->redirectToList(); |
| 56 | 52 | } |
| 57 | 53 | |
| 58 | - public function editAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm) |
|
| 59 | - { |
|
| 54 | + public function editAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm) { |
|
| 60 | 55 | |
| 61 | 56 | $document = $this->documentRepository->findByUid($documentForm->getDocumentUid()); |
| 62 | 57 | $this->view->assign('document', $document); |
@@ -64,8 +59,7 @@ discard block |
||
| 64 | 59 | } |
| 65 | 60 | |
| 66 | 61 | |
| 67 | - public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) |
|
| 68 | - { |
|
| 62 | + public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) { |
|
| 69 | 63 | parent::createAction($newDocumentForm); |
| 70 | 64 | $this->redirectToList('CREATE_OK'); |
| 71 | 65 | } |