@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $mods = new \EWW\Dpf\Helper\Mods($document->getXmlData()); |
| 102 | 102 | $slub = new \EWW\Dpf\Helper\Slub($document->getSlubInfoData()); |
| 103 | 103 | |
| 104 | - $excludeGroupAttributes = array(); |
|
| 104 | + $excludeGroupAttributes = array (); |
|
| 105 | 105 | |
| 106 | 106 | foreach ($document->getDocumentType()->getMetadataPage() as $metadataPage) { |
| 107 | 107 | $documentFormPage = new \EWW\Dpf\Domain\Model\DocumentFormPage(); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | // get fixed attributes from xpath configuration |
| 134 | - $fixedGroupAttributes = array(); |
|
| 134 | + $fixedGroupAttributes = array (); |
|
| 135 | 135 | |
| 136 | 136 | preg_match_all('/[A-Za-z0-9:@\.]+(\[@.*?\])*/', $metadataGroup->getAbsoluteMapping(), $groupMappingPathParts); |
| 137 | 137 | $groupMappingPathParts = $groupMappingPathParts[0]; |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | // mods:mods |
| 332 | 332 | $modsData['documentUid'] = $documentForm->getDocumentUid(); |
| 333 | 333 | $modsData['metadata'] = $formMetaData['mods']; |
| 334 | - $modsData['files'] = array(); |
|
| 334 | + $modsData['files'] = array (); |
|
| 335 | 335 | |
| 336 | 336 | $exporter->buildModsFromForm($modsData); |
| 337 | 337 | $modsXml = $exporter->getModsData(); |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | // slub:info |
| 347 | 347 | $slubInfoData['documentUid'] = $documentForm->getDocumentUid(); |
| 348 | 348 | $slubInfoData['metadata'] = $formMetaData['slubInfo']; |
| 349 | - $slubInfoData['files'] = array(); |
|
| 349 | + $slubInfoData['files'] = array (); |
|
| 350 | 350 | $exporter->buildSlubInfoFromForm($slubInfoData, $documentType, $document->getProcessNumber()); |
| 351 | 351 | $slubInfoXml = $exporter->getSlubInfoData(); |
| 352 | 352 | |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | foreach ($group as $groupItem) { |
| 366 | 366 | |
| 367 | - $item = array(); |
|
| 367 | + $item = array (); |
|
| 368 | 368 | |
| 369 | 369 | $uid = $groupItem->getUid(); |
| 370 | 370 | $metadataGroup = $this->metadataGroupRepository->findByUid($uid); |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | $fieldMapping = $metadataObject->getRelativeMapping(); |
| 389 | 389 | |
| 390 | - $formField = array(); |
|
| 390 | + $formField = array (); |
|
| 391 | 391 | |
| 392 | 392 | $value = $fieldItem->getValue(); |
| 393 | 393 | |
@@ -424,11 +424,11 @@ discard block |
||
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | if (!key_exists('attributes', $item)) { |
| 427 | - $item['attributes'] = array(); |
|
| 427 | + $item['attributes'] = array (); |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | if (!key_exists('values', $item)) { |
| 431 | - $item['values'] = array(); |
|
| 431 | + $item['values'] = array (); |
|
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | if ($groupItem->getMandatory() || $defaultValueCount < $fieldValueCount || $defaultValueCount == $fieldCount) { |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | use EWW\Dpf\Domain\Workflow\DocumentWorkflow; |
| 20 | 20 | use EWW\Dpf\Services\ProcessNumber\ProcessNumberGenerator; |
| 21 | 21 | |
| 22 | -class DocumentMapper |
|
| 23 | -{ |
|
| 22 | +class DocumentMapper { |
|
| 24 | 23 | |
| 25 | 24 | /** |
| 26 | 25 | * objectManager |
@@ -70,8 +69,7 @@ discard block |
||
| 70 | 69 | */ |
| 71 | 70 | protected $fileRepository = null; |
| 72 | 71 | |
| 73 | - public function getDocumentForm($document) |
|
| 74 | - { |
|
| 72 | + public function getDocumentForm($document) { |
|
| 75 | 73 | |
| 76 | 74 | $documentForm = new \EWW\Dpf\Domain\Model\DocumentForm(); |
| 77 | 75 | $documentForm->setUid($document->getDocumentType()->getUid()); |
@@ -296,8 +294,7 @@ discard block |
||
| 296 | 294 | return $documentForm; |
| 297 | 295 | } |
| 298 | 296 | |
| 299 | - public function getDocument($documentForm) |
|
| 300 | - { |
|
| 297 | + public function getDocument($documentForm) { |
|
| 301 | 298 | |
| 302 | 299 | if ($documentForm->getDocumentUid()) { |
| 303 | 300 | $document = $this->documentRepository->findByUid($documentForm->getDocumentUid()); |
@@ -355,8 +352,7 @@ discard block |
||
| 355 | 352 | return $document; |
| 356 | 353 | } |
| 357 | 354 | |
| 358 | - public function getMetadata($documentForm) |
|
| 359 | - { |
|
| 355 | + public function getMetadata($documentForm) { |
|
| 360 | 356 | |
| 361 | 357 | foreach ($documentForm->getItems() as $page) { |
| 362 | 358 | |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | * The TYPO3 project - inspiring people to share! |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -class Mets |
|
| 18 | -{ |
|
| 17 | +class Mets { |
|
| 19 | 18 | |
| 20 | 19 | /** |
| 21 | 20 | * mets |
@@ -24,30 +23,25 @@ discard block |
||
| 24 | 23 | */ |
| 25 | 24 | protected $metsDom; |
| 26 | 25 | |
| 27 | - public function __construct($metsXml) |
|
| 28 | - { |
|
| 26 | + public function __construct($metsXml) { |
|
| 29 | 27 | $this->setMetsXml($metsXml); |
| 30 | 28 | } |
| 31 | 29 | |
| 32 | - public function setMetsXml($metsXml) |
|
| 33 | - { |
|
| 30 | + public function setMetsXml($metsXml) { |
|
| 34 | 31 | $metsDom = new \DOMDocument(); |
| 35 | 32 | $metsDom->loadXML($metsXml); |
| 36 | 33 | $this->metsDom = $metsDom; |
| 37 | 34 | } |
| 38 | 35 | |
| 39 | - public function getMetsXml() |
|
| 40 | - { |
|
| 36 | + public function getMetsXml() { |
|
| 41 | 37 | return $this->metsDom->saveXML(); |
| 42 | 38 | } |
| 43 | 39 | |
| 44 | - public function getMetsXpath() |
|
| 45 | - { |
|
| 40 | + public function getMetsXpath() { |
|
| 46 | 41 | return new \DOMXPath($this->metsDom); |
| 47 | 42 | } |
| 48 | 43 | |
| 49 | - public function getMods() |
|
| 50 | - { |
|
| 44 | + public function getMods() { |
|
| 51 | 45 | $xpath = $this->getMetsXpath(); |
| 52 | 46 | |
| 53 | 47 | $xpath->registerNamespace("mods", "http://www.loc.gov/mods/v3"); |
@@ -60,8 +54,7 @@ discard block |
||
| 60 | 54 | return $mods; |
| 61 | 55 | } |
| 62 | 56 | |
| 63 | - public function getSlub() |
|
| 64 | - { |
|
| 57 | + public function getSlub() { |
|
| 65 | 58 | $xpath = $this->getMetsXpath(); |
| 66 | 59 | |
| 67 | 60 | $xpath->registerNamespace("slub", "http://slub-dresden.de/"); |
@@ -74,8 +67,7 @@ discard block |
||
| 74 | 67 | return $slub; |
| 75 | 68 | } |
| 76 | 69 | |
| 77 | - public function getState() |
|
| 78 | - { |
|
| 70 | + public function getState() { |
|
| 79 | 71 | |
| 80 | 72 | $xpath = $this->getMetsXpath(); |
| 81 | 73 | $xpath->registerNamespace("mets", "http://www.loc.gov/METS/"); |
@@ -84,8 +76,7 @@ discard block |
||
| 84 | 76 | return $dmdSec->item(0)->getAttribute("STATUS"); |
| 85 | 77 | } |
| 86 | 78 | |
| 87 | - public function getLastModDate() |
|
| 88 | - { |
|
| 79 | + public function getLastModDate() { |
|
| 89 | 80 | $xpath = $this->getMetsXpath(); |
| 90 | 81 | $xpath->registerNamespace("mets", "http://www.loc.gov/METS/"); |
| 91 | 82 | |
@@ -93,8 +84,7 @@ discard block |
||
| 93 | 84 | return $dmdSec->item(0)->getAttribute("LASTMODDATE"); |
| 94 | 85 | } |
| 95 | 86 | |
| 96 | - public function getFiles() |
|
| 97 | - { |
|
| 87 | + public function getFiles() { |
|
| 98 | 88 | $xpath = $this->getMetsXpath(); |
| 99 | 89 | |
| 100 | 90 | $xpath->registerNamespace("xlink", "http://www.w3.org/1999/xlink"); |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | ); |
| 219 | 219 | } else { |
| 220 | 220 | $definitionBuilder->addTransition( |
| 221 | - new Transition($transitionName, $fromState, $transition["to"]) |
|
| 221 | + new Transition($transitionName, $fromState, $transition["to"]) |
|
| 222 | 222 | ); |
| 223 | 223 | } |
| 224 | 224 | } |
@@ -36,30 +36,30 @@ |
||
| 36 | 36 | public const REMOTE_STATE_INACTIVE = "INACTIVE"; |
| 37 | 37 | public const REMOTE_STATE_DELETED = "DELETED"; |
| 38 | 38 | |
| 39 | - public const STATE_NONE_NONE = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_NONE; |
|
| 39 | + public const STATE_NONE_NONE = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_NONE; |
|
| 40 | 40 | |
| 41 | 41 | // New |
| 42 | - public const STATE_NEW_NONE = self::LOCAL_STATE_NEW.':'.self::REMOTE_STATE_NONE; |
|
| 42 | + public const STATE_NEW_NONE = self::LOCAL_STATE_NEW . ':' . self::REMOTE_STATE_NONE; |
|
| 43 | 43 | |
| 44 | 44 | // Registered |
| 45 | - public const STATE_REGISTERED_NONE = self::LOCAL_STATE_REGISTERED.':'.self::REMOTE_STATE_NONE; |
|
| 45 | + public const STATE_REGISTERED_NONE = self::LOCAL_STATE_REGISTERED . ':' . self::REMOTE_STATE_NONE; |
|
| 46 | 46 | |
| 47 | 47 | // In progress |
| 48 | - public const STATE_IN_PROGRESS_NONE = self::LOCAL_STATE_IN_PROGRESS.':'.self::REMOTE_STATE_NONE; |
|
| 49 | - public const STATE_IN_PROGRESS_ACTIVE = self::LOCAL_STATE_IN_PROGRESS.":".self::REMOTE_STATE_ACTIVE; |
|
| 50 | - public const STATE_IN_PROGRESS_INACTIVE = self::LOCAL_STATE_IN_PROGRESS.":".self::REMOTE_STATE_INACTIVE; |
|
| 51 | - public const STATE_IN_PROGRESS_DELETED = self::LOCAL_STATE_IN_PROGRESS.":".self::REMOTE_STATE_DELETED; |
|
| 48 | + public const STATE_IN_PROGRESS_NONE = self::LOCAL_STATE_IN_PROGRESS . ':' . self::REMOTE_STATE_NONE; |
|
| 49 | + public const STATE_IN_PROGRESS_ACTIVE = self::LOCAL_STATE_IN_PROGRESS . ":" . self::REMOTE_STATE_ACTIVE; |
|
| 50 | + public const STATE_IN_PROGRESS_INACTIVE = self::LOCAL_STATE_IN_PROGRESS . ":" . self::REMOTE_STATE_INACTIVE; |
|
| 51 | + public const STATE_IN_PROGRESS_DELETED = self::LOCAL_STATE_IN_PROGRESS . ":" . self::REMOTE_STATE_DELETED; |
|
| 52 | 52 | |
| 53 | 53 | // Active |
| 54 | - public const STATE_NONE_ACTIVE = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_ACTIVE; |
|
| 54 | + public const STATE_NONE_ACTIVE = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_ACTIVE; |
|
| 55 | 55 | |
| 56 | 56 | // Postponed |
| 57 | - public const STATE_POSTPONED_NONE = self::LOCAL_STATE_POSTPONED.':'.self::REMOTE_STATE_NONE; |
|
| 58 | - public const STATE_NONE_INACTIVE = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_INACTIVE; |
|
| 57 | + public const STATE_POSTPONED_NONE = self::LOCAL_STATE_POSTPONED . ':' . self::REMOTE_STATE_NONE; |
|
| 58 | + public const STATE_NONE_INACTIVE = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_INACTIVE; |
|
| 59 | 59 | |
| 60 | 60 | // Discarded |
| 61 | - public const STATE_DISCARDED_NONE = self::LOCAL_STATE_DISCARDED.':'.self::REMOTE_STATE_NONE; |
|
| 62 | - public const STATE_NONE_DELETED = self::LOCAL_STATE_NONE.':'.self::REMOTE_STATE_DELETED; |
|
| 61 | + public const STATE_DISCARDED_NONE = self::LOCAL_STATE_DISCARDED . ':' . self::REMOTE_STATE_NONE; |
|
| 62 | + public const STATE_NONE_DELETED = self::LOCAL_STATE_NONE . ':' . self::REMOTE_STATE_DELETED; |
|
| 63 | 63 | |
| 64 | 64 | public const TRANSITION_CREATE = "CREATE_TRANSITION"; |
| 65 | 65 | public const TRANSITION_CREATE_REGISTER = "CREATE_REGISTER_TRANSITION"; |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | use Symfony\Component\Workflow\Registry; |
| 22 | 22 | use Symfony\Component\EventDispatcher\EventDispatcher; |
| 23 | 23 | |
| 24 | -class DocumentWorkflow |
|
| 25 | -{ |
|
| 24 | +class DocumentWorkflow { |
|
| 26 | 25 | public const LOCAL_STATE_NONE = 'NONE'; |
| 27 | 26 | public const LOCAL_STATE_NEW = 'NEW'; |
| 28 | 27 | public const LOCAL_STATE_REGISTERED = 'REGISTERED'; |
@@ -203,8 +202,7 @@ discard block |
||
| 203 | 202 | ], |
| 204 | 203 | ]; |
| 205 | 204 | |
| 206 | - public static function getWorkflow() |
|
| 207 | - { |
|
| 205 | + public static function getWorkflow() { |
|
| 208 | 206 | $definitionBuilder = new DefinitionBuilder(); |
| 209 | 207 | |
| 210 | 208 | $definitionBuilder->addPlaces(self::PLACES); |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * The abstract repository |
| 19 | 19 | */ |
| 20 | -class AbstractRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
|
| 21 | -{ |
|
| 20 | +class AbstractRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { |
|
| 22 | 21 | /** |
| 23 | 22 | * Finds all records of all clients. |
| 24 | 23 | * |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function crossClientFindAll($returnRawQueryResult = TRUE) { |
| 29 | 29 | /** @var $querySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */ |
| 30 | 30 | $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings'); |
| 31 | - $querySettings->setRespectStoragePage(false); |
|
| 31 | + $querySettings->setRespectStoragePage(FALSE); |
|
| 32 | 32 | $this->setDefaultQuerySettings($querySettings); |
| 33 | 33 | $query = $this->createQuery(); |
| 34 | 34 | return $query->execute($returnRawQueryResult); |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * The repository for MetadataPages |
| 19 | 19 | */ |
| 20 | -class MetadataPageRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository |
|
| 21 | -{ |
|
| 20 | +class MetadataPageRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository { |
|
| 22 | 21 | |
| 23 | 22 | } |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * The repository for MetadataGroups |
| 19 | 19 | */ |
| 20 | -class MetadataGroupRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository |
|
| 21 | -{ |
|
| 20 | +class MetadataGroupRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository { |
|
| 22 | 21 | |
| 23 | 22 | } |
@@ -20,5 +20,5 @@ |
||
| 20 | 20 | class MetadataObjectRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository |
| 21 | 21 | { |
| 22 | 22 | |
| 23 | - protected $defaultOrderings = array("sorting" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING); |
|
| 23 | + protected $defaultOrderings = array ("sorting" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING); |
|
| 24 | 24 | } |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * The repository for MetadataObjects |
| 19 | 19 | */ |
| 20 | -class MetadataObjectRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository |
|
| 21 | -{ |
|
| 20 | +class MetadataObjectRepository extends \EWW\Dpf\Domain\Repository\AbstractRepository { |
|
| 22 | 21 | |
| 23 | 22 | protected $defaultOrderings = array("sorting" => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING); |
| 24 | 23 | } |
@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace EWW\Dpf\Domain\Repository; |
| 3 | 3 | |
| 4 | -class FrontendUserRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository |
|
| 5 | -{ |
|
| 4 | +class FrontendUserRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository { |
|
| 6 | 5 | } |
@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace EWW\Dpf\Domain\Repository; |
| 3 | 3 | |
| 4 | -class FrontendUserGroupRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserGroupRepository |
|
| 5 | -{ |
|
| 4 | +class FrontendUserGroupRepository extends \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserGroupRepository { |
|
| 6 | 5 | } |