@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * StoredSearch |
| 19 | 19 | */ |
| 20 | -class StoredSearch extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
|
| 21 | -{ |
|
| 20 | +class StoredSearch extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { |
|
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | 23 | * name |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | * |
| 43 | 42 | * @return string $name |
| 44 | 43 | */ |
| 45 | - public function getName() |
|
| 46 | - { |
|
| 44 | + public function getName() { |
|
| 47 | 45 | return $this->name; |
| 48 | 46 | } |
| 49 | 47 | |
@@ -53,8 +51,7 @@ discard block |
||
| 53 | 51 | * @param string $name |
| 54 | 52 | * @return void |
| 55 | 53 | */ |
| 56 | - public function setName($name) |
|
| 57 | - { |
|
| 54 | + public function setName($name) { |
|
| 58 | 55 | $this->name = $name; |
| 59 | 56 | } |
| 60 | 57 | |
@@ -64,8 +61,7 @@ discard block |
||
| 64 | 61 | * |
| 65 | 62 | * @return string $query |
| 66 | 63 | */ |
| 67 | - public function getQuery() |
|
| 68 | - { |
|
| 64 | + public function getQuery() { |
|
| 69 | 65 | return $this->query; |
| 70 | 66 | } |
| 71 | 67 | |
@@ -76,8 +72,7 @@ discard block |
||
| 76 | 72 | * @param string $query |
| 77 | 73 | * @return void |
| 78 | 74 | */ |
| 79 | - public function setQuery($query) |
|
| 80 | - { |
|
| 75 | + public function setQuery($query) { |
|
| 81 | 76 | $this->query = $query; |
| 82 | 77 | } |
| 83 | 78 | |
@@ -327,8 +327,8 @@ |
||
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | /** |
| 330 | - * extended search action |
|
| 331 | - */ |
|
| 330 | + * extended search action |
|
| 331 | + */ |
|
| 332 | 332 | public function extendedSearchAction() |
| 333 | 333 | { |
| 334 | 334 | /** @var FrontendUser $feUser */ |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * SearchController |
| 28 | 28 | */ |
| 29 | -class SearchController extends \EWW\Dpf\Controller\AbstractController |
|
| 30 | -{ |
|
| 29 | +class SearchController extends \EWW\Dpf\Controller\AbstractController { |
|
| 31 | 30 | |
| 32 | 31 | /** |
| 33 | 32 | * documentRepository |
@@ -182,8 +181,7 @@ discard block |
||
| 182 | 181 | * |
| 183 | 182 | * @return void |
| 184 | 183 | */ |
| 185 | - public function searchAction() |
|
| 186 | - { |
|
| 184 | + public function searchAction() { |
|
| 187 | 185 | $args = $this->request->getArguments(); |
| 188 | 186 | |
| 189 | 187 | /** @var SearchSessionData $workspaceSessionData */ |
@@ -245,8 +243,7 @@ discard block |
||
| 245 | 243 | protected function getSearchQuery( |
| 246 | 244 | $from = 0, $bookmarkIdentifiers = [], $filters= [], $excludeFilters = [], |
| 247 | 245 | $sortField = null, $sortOrder = null, $queryString = null |
| 248 | - ) |
|
| 249 | - { |
|
| 246 | + ) { |
|
| 250 | 247 | $workspaceFilter = [ |
| 251 | 248 | 'bool' => [ |
| 252 | 249 | 'must' => [ |
@@ -287,8 +284,7 @@ discard block |
||
| 287 | 284 | * Batch operations action. |
| 288 | 285 | * @param array $listData |
| 289 | 286 | */ |
| 290 | - public function batchAction($listData) |
|
| 291 | - { |
|
| 287 | + public function batchAction($listData) { |
|
| 292 | 288 | if (array_key_exists('action', $listData)) { |
| 293 | 289 | $this->forward($listData['action'], null, null, ['listData' => $listData]); |
| 294 | 290 | } |
@@ -299,8 +295,7 @@ discard block |
||
| 299 | 295 | * Batch operation, bookmark documents. |
| 300 | 296 | * @param array $listData |
| 301 | 297 | */ |
| 302 | - public function batchBookmarkAction($listData) |
|
| 303 | - { |
|
| 298 | + public function batchBookmarkAction($listData) { |
|
| 304 | 299 | $successful = []; |
| 305 | 300 | $checkedDocumentIdentifiers = []; |
| 306 | 301 | |
@@ -353,8 +348,7 @@ discard block |
||
| 353 | 348 | /** |
| 354 | 349 | * extended search action |
| 355 | 350 | */ |
| 356 | - public function extendedSearchAction() |
|
| 357 | - { |
|
| 351 | + public function extendedSearchAction() { |
|
| 358 | 352 | /** @var FrontendUser $feUser */ |
| 359 | 353 | $feUser = $this->security->getUser(); |
| 360 | 354 | |
@@ -432,8 +426,7 @@ discard block |
||
| 432 | 426 | /** |
| 433 | 427 | * gets a list of latest documents |
| 434 | 428 | */ |
| 435 | - public function latestAction() |
|
| 436 | - { |
|
| 429 | + public function latestAction() { |
|
| 437 | 430 | try { |
| 438 | 431 | $query = $this->searchLatest(); |
| 439 | 432 | |
@@ -476,8 +469,7 @@ discard block |
||
| 476 | 469 | * @param string $objectState |
| 477 | 470 | * @return void |
| 478 | 471 | */ |
| 479 | - public function importAction($documentObjectIdentifier, $objectState) |
|
| 480 | - { |
|
| 472 | + public function importAction($documentObjectIdentifier, $objectState) { |
|
| 481 | 473 | $documentTransferManager = $this->objectManager->get(DocumentTransferManager::class); |
| 482 | 474 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
| 483 | 475 | $documentTransferManager->setRemoteRepository($remoteRepository); |
@@ -523,8 +515,7 @@ discard block |
||
| 523 | 515 | * @param string $documentObjectIdentifier |
| 524 | 516 | * @return void |
| 525 | 517 | */ |
| 526 | - public function updateIndexAction($documentObjectIdentifier) |
|
| 527 | - { |
|
| 518 | + public function updateIndexAction($documentObjectIdentifier) { |
|
| 528 | 519 | $document = $this->documentRepository->findByObjectIdentifier($documentObjectIdentifier); |
| 529 | 520 | |
| 530 | 521 | if (is_a($document, Document::class)) { |
@@ -545,8 +536,7 @@ discard block |
||
| 545 | 536 | * @param \EWW\Dpf\Domain\Model\Document $document |
| 546 | 537 | * @return void |
| 547 | 538 | */ |
| 548 | - public function doubletCheckAction(\EWW\Dpf\Domain\Model\Document $document) |
|
| 549 | - { |
|
| 539 | + public function doubletCheckAction(\EWW\Dpf\Domain\Model\Document $document) { |
|
| 550 | 540 | $this->authorizationChecker->denyAccessUnlessGranted(DocumentVoter::DOUBLET_CHECK, $document); |
| 551 | 541 | |
| 552 | 542 | try { |
@@ -629,8 +619,7 @@ discard block |
||
| 629 | 619 | * returns the query to get latest documents |
| 630 | 620 | * @return mixed |
| 631 | 621 | */ |
| 632 | - public function searchLatest() |
|
| 633 | - { |
|
| 622 | + public function searchLatest() { |
|
| 634 | 623 | $client = $this->clientRepository->findAll()->current(); |
| 635 | 624 | |
| 636 | 625 | // get the latest documents /CREATED_DATE |
@@ -656,8 +645,7 @@ discard block |
||
| 656 | 645 | * |
| 657 | 646 | * @return int |
| 658 | 647 | */ |
| 659 | - protected function itemsPerPage() |
|
| 660 | - { |
|
| 648 | + protected function itemsPerPage() { |
|
| 661 | 649 | /** @var SearchSessionData $workspaceData */ |
| 662 | 650 | $workspaceData = $this->session->getWorkspaceData(); |
| 663 | 651 | $itemsPerPage = $workspaceData->getItemsPerPage(); |
@@ -672,8 +660,7 @@ discard block |
||
| 672 | 660 | * @param $string |
| 673 | 661 | * @return mixed |
| 674 | 662 | */ |
| 675 | - private function escapeQuery($string) |
|
| 676 | - { |
|
| 663 | + private function escapeQuery($string) { |
|
| 677 | 664 | $luceneReservedCharacters = preg_quote('+-&|!(){}[]^~?:\\'); |
| 678 | 665 | $string = preg_replace_callback( |
| 679 | 666 | '/([' . $luceneReservedCharacters . '])/', |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | $this->list( |
| 227 | - (empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage()), |
|
| 227 | + (empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage()), |
|
| 228 | 228 | $this->escapeQuery(trim($simpleSearch)) |
| 229 | 229 | ); |
| 230 | 230 | |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | * @return array |
| 250 | 250 | */ |
| 251 | 251 | protected function getSearchQuery( |
| 252 | - $from = 0, $bookmarkIdentifiers = [], $filters= [], $excludeFilters = [], |
|
| 252 | + $from = 0, $bookmarkIdentifiers = [], $filters = [], $excludeFilters = [], |
|
| 253 | 253 | $sortField = null, $sortOrder = null, $queryString = null |
| 254 | 254 | ) |
| 255 | 255 | { |
@@ -310,12 +310,12 @@ discard block |
||
| 310 | 310 | $successful = []; |
| 311 | 311 | $checkedDocumentIdentifiers = []; |
| 312 | 312 | |
| 313 | - if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers']) ) { |
|
| 313 | + if (array_key_exists('documentIdentifiers', $listData) && is_array($listData['documentIdentifiers'])) { |
|
| 314 | 314 | $checkedDocumentIdentifiers = $listData['documentIdentifiers']; |
| 315 | 315 | |
| 316 | 316 | foreach ($listData['documentIdentifiers'] as $documentIdentifier) { |
| 317 | 317 | |
| 318 | - if ( $listData['documentAliasState'][$documentIdentifier] != DocumentWorkflow::ALIAS_STATE_NEW) { |
|
| 318 | + if ($listData['documentAliasState'][$documentIdentifier] != DocumentWorkflow::ALIAS_STATE_NEW) { |
|
| 319 | 319 | if ( |
| 320 | 320 | $this->bookmarkRepository->addBookmark( |
| 321 | 321 | $documentIdentifier, |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 354 | 354 | $this->redirect( |
| 355 | 355 | $redirectAction, $redirectController, null, |
| 356 | - array('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 356 | + array ('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
|
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | /** |
@@ -393,22 +393,22 @@ discard block |
||
| 393 | 393 | $this->view->assign('documentTypes', $docTypes); |
| 394 | 394 | |
| 395 | 395 | $states[DocumentWorkflow::ALIAS_STATE_NEW] = LocalizationUtility::translate( |
| 396 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_NEW, 'dpf' |
|
| 396 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_NEW, 'dpf' |
|
| 397 | 397 | ); |
| 398 | 398 | $states[DocumentWorkflow::ALIAS_STATE_REGISTERED] = LocalizationUtility::translate( |
| 399 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_REGISTERED, 'dpf' |
|
| 399 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_REGISTERED, 'dpf' |
|
| 400 | 400 | ); |
| 401 | 401 | $states[DocumentWorkflow::ALIAS_STATE_IN_PROGRESS] = LocalizationUtility::translate( |
| 402 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_IN_PROGRESS, 'dpf' |
|
| 402 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_IN_PROGRESS, 'dpf' |
|
| 403 | 403 | ); |
| 404 | 404 | $states[DocumentWorkflow::ALIAS_STATE_RELEASED] = LocalizationUtility::translate( |
| 405 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_RELEASED, 'dpf' |
|
| 405 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_RELEASED, 'dpf' |
|
| 406 | 406 | ); |
| 407 | 407 | $states[DocumentWorkflow::ALIAS_STATE_POSTPONED] = LocalizationUtility::translate( |
| 408 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_POSTPONED, 'dpf' |
|
| 408 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_POSTPONED, 'dpf' |
|
| 409 | 409 | ); |
| 410 | 410 | $states[DocumentWorkflow::ALIAS_STATE_DISCARDED] = LocalizationUtility::translate( |
| 411 | - "manager.documentList.state.".DocumentWorkflow::ALIAS_STATE_DISCARDED, 'dpf' |
|
| 411 | + "manager.documentList.state." . DocumentWorkflow::ALIAS_STATE_DISCARDED, 'dpf' |
|
| 412 | 412 | ); |
| 413 | 413 | |
| 414 | 414 | $this->view->assign('states', $states); |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | $currentPage = 1; |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | - $this->list((empty($currentPage)? 0 : ($currentPage-1) * $this->itemsPerPage()), $simpleSearch); |
|
| 430 | + $this->list((empty($currentPage) ? 0 : ($currentPage - 1) * $this->itemsPerPage()), $simpleSearch); |
|
| 431 | 431 | |
| 432 | 432 | $this->view->assign('simpleSearch', $simpleSearch); |
| 433 | 433 | $this->view->assign('currentPage', $currentPage); |
@@ -468,10 +468,10 @@ discard block |
||
| 468 | 468 | |
| 469 | 469 | if ($extSearch) { |
| 470 | 470 | // redirect to extended search view |
| 471 | - $this->forward("extendedSearch", null, null, array('results' => $results, 'query' => $args['query'])); |
|
| 471 | + $this->forward("extendedSearch", null, null, array ('results' => $results, 'query' => $args['query'])); |
|
| 472 | 472 | } else { |
| 473 | 473 | // redirect to list view |
| 474 | - $this->forward("list", null, null, array('results' => $results, 'query' => $args['query'])); |
|
| 474 | + $this->forward("list", null, null, array ('results' => $results, 'query' => $args['query'])); |
|
| 475 | 475 | } |
| 476 | 476 | } |
| 477 | 477 | |
@@ -488,14 +488,14 @@ discard block |
||
| 488 | 488 | $remoteRepository = $this->objectManager->get(FedoraRepository::class); |
| 489 | 489 | $documentTransferManager->setRemoteRepository($remoteRepository); |
| 490 | 490 | |
| 491 | - $args = array(); |
|
| 491 | + $args = array (); |
|
| 492 | 492 | |
| 493 | 493 | try { |
| 494 | 494 | if ($documentTransferManager->retrieve($documentObjectIdentifier)) { |
| 495 | 495 | $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:document_retrieve.success'; |
| 496 | 496 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::OK; |
| 497 | 497 | $document = $this->documentRepository->findOneByObjectIdentifier($documentObjectIdentifier); |
| 498 | - $args[] = $document->getObjectIdentifier()." (".$document->getTitle().")"; |
|
| 498 | + $args[] = $document->getObjectIdentifier() . " (" . $document->getTitle() . ")"; |
|
| 499 | 499 | } else { |
| 500 | 500 | $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR; |
| 501 | 501 | $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:error.retrieve_failed'; |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | true |
| 522 | 522 | ); |
| 523 | 523 | |
| 524 | - $this->forward('updateIndex', null, null, array('documentObjectIdentifier' => $documentObjectIdentifier)); |
|
| 524 | + $this->forward('updateIndex', null, null, array ('documentObjectIdentifier' => $documentObjectIdentifier)); |
|
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | /** |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | |
| 585 | 585 | $results = $elasticSearch->search($query, ''); |
| 586 | 586 | |
| 587 | - $searchList = array(); |
|
| 587 | + $searchList = array (); |
|
| 588 | 588 | |
| 589 | 589 | // filter out identical document from the search result list |
| 590 | 590 | foreach ($results['hits'] as $entry) { |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | $client = $this->clientRepository->findAll()->current(); |
| 641 | 641 | |
| 642 | 642 | // get the latest documents /CREATED_DATE |
| 643 | - $query['body']['sort'] = array('CREATED_DATE' => array('order' => 'desc')); |
|
| 643 | + $query['body']['sort'] = array ('CREATED_DATE' => array ('order' => 'desc')); |
|
| 644 | 644 | |
| 645 | 645 | // add owner id |
| 646 | 646 | $query['body']['query']['bool']['must']['term']['OWNER_ID'] = $client->getOwnerId(); |
@@ -668,8 +668,8 @@ discard block |
||
| 668 | 668 | $workspaceData = $this->session->getWorkspaceData(); |
| 669 | 669 | $itemsPerPage = $workspaceData->getItemsPerPage(); |
| 670 | 670 | |
| 671 | - $default = ($this->settings['workspaceItemsPerPage'])? $this->settings['workspaceItemsPerPage'] : 10; |
|
| 672 | - return ($itemsPerPage)? $itemsPerPage : $default; |
|
| 671 | + $default = ($this->settings['workspaceItemsPerPage']) ? $this->settings['workspaceItemsPerPage'] : 10; |
|
| 672 | + return ($itemsPerPage) ? $itemsPerPage : $default; |
|
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | $luceneReservedCharacters = preg_quote('+-&|!(){}[]^~?:\\'); |
| 684 | 684 | $string = preg_replace_callback( |
| 685 | 685 | '/([' . $luceneReservedCharacters . '])/', |
| 686 | - function ($matches) { |
|
| 686 | + function($matches) { |
|
| 687 | 687 | return '\\' . $matches[0]; |
| 688 | 688 | }, |
| 689 | 689 | $string |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @var \EWW\Dpf\Domain\Repository\DocumentRepository |
| 36 | 36 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 37 | 37 | */ |
| 38 | - protected $documentRepository = null; |
|
| 38 | + protected $documentRepository = NULL; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * documenTypeRepository |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @var \EWW\Dpf\Domain\Repository\ClientRepository |
| 52 | 52 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 53 | 53 | */ |
| 54 | - protected $clientRepository = null; |
|
| 54 | + protected $clientRepository = NULL; |
|
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * @var \EWW\Dpf\Services\ElasticSearch\ElasticSearch |
| 61 | 61 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 62 | 62 | */ |
| 63 | - protected $elasticSearch = null; |
|
| 63 | + protected $elasticSearch = NULL; |
|
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | * @var \EWW\Dpf\Services\ElasticSearch\QueryBuilder |
| 70 | 70 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 71 | 71 | */ |
| 72 | - protected $queryBuilder = null; |
|
| 72 | + protected $queryBuilder = NULL; |
|
| 73 | 73 | |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * @var \EWW\Dpf\Domain\Repository\BookmarkRepository |
| 88 | 88 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 89 | 89 | */ |
| 90 | - protected $bookmarkRepository = null; |
|
| 90 | + protected $bookmarkRepository = NULL; |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * fisDataService |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @var \EWW\Dpf\Services\FeUser\FisDataService |
| 96 | 96 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 97 | 97 | */ |
| 98 | - protected $fisDataService = null; |
|
| 98 | + protected $fisDataService = NULL; |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * metadataGroupRepository |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $this->uriBuilder->getRequest()->getRequestUri() |
| 214 | 214 | ); |
| 215 | 215 | |
| 216 | - $currentPage = null; |
|
| 216 | + $currentPage = NULL; |
|
| 217 | 217 | $checkedDocumentIdentifiers = []; |
| 218 | 218 | $pagination = $this->getParametersSafely('@widget_0'); |
| 219 | 219 | if ($pagination) { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | */ |
| 251 | 251 | protected function getSearchQuery( |
| 252 | 252 | $from = 0, $bookmarkIdentifiers = [], $filters= [], $excludeFilters = [], |
| 253 | - $sortField = null, $sortOrder = null, $queryString = null |
|
| 253 | + $sortField = NULL, $sortOrder = NULL, $queryString = NULL |
|
| 254 | 254 | ) |
| 255 | 255 | { |
| 256 | 256 | $workspaceFilter = [ |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | public function batchAction($listData) |
| 297 | 297 | { |
| 298 | 298 | if (array_key_exists('action', $listData)) { |
| 299 | - $this->forward($listData['action'], null, null, ['listData' => $listData]); |
|
| 299 | + $this->forward($listData['action'], NULL, NULL, ['listData' => $listData]); |
|
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | list($redirectAction, $redirectController) = $this->session->getStoredAction(); |
| 354 | 354 | $this->redirect( |
| 355 | - $redirectAction, $redirectController, null, |
|
| 355 | + $redirectAction, $redirectController, NULL, |
|
| 356 | 356 | array('message' => $message, 'checkedDocumentIdentifiers' => $checkedDocumentIdentifiers)); |
| 357 | 357 | } |
| 358 | 358 | |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | $this->uriBuilder->getRequest()->getRequestUri() |
| 418 | 418 | ); |
| 419 | 419 | |
| 420 | - $currentPage = null; |
|
| 420 | + $currentPage = NULL; |
|
| 421 | 421 | $checkedDocumentIdentifiers = []; |
| 422 | 422 | $pagination = $this->getParametersSafely('@widget_0'); |
| 423 | 423 | if ($pagination) { |
@@ -462,16 +462,16 @@ discard block |
||
| 462 | 462 | $message, |
| 463 | 463 | '', |
| 464 | 464 | $severity, |
| 465 | - true |
|
| 465 | + TRUE |
|
| 466 | 466 | ); |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | if ($extSearch) { |
| 470 | 470 | // redirect to extended search view |
| 471 | - $this->forward("extendedSearch", null, null, array('results' => $results, 'query' => $args['query'])); |
|
| 471 | + $this->forward("extendedSearch", NULL, NULL, array('results' => $results, 'query' => $args['query'])); |
|
| 472 | 472 | } else { |
| 473 | 473 | // redirect to list view |
| 474 | - $this->forward("list", null, null, array('results' => $results, 'query' => $args['query'])); |
|
| 474 | + $this->forward("list", NULL, NULL, array('results' => $results, 'query' => $args['query'])); |
|
| 475 | 475 | } |
| 476 | 476 | } |
| 477 | 477 | |
@@ -518,10 +518,10 @@ discard block |
||
| 518 | 518 | $message, |
| 519 | 519 | '', |
| 520 | 520 | $severity, |
| 521 | - true |
|
| 521 | + TRUE |
|
| 522 | 522 | ); |
| 523 | 523 | |
| 524 | - $this->forward('updateIndex', null, null, array('documentObjectIdentifier' => $documentObjectIdentifier)); |
|
| 524 | + $this->forward('updateIndex', NULL, NULL, array('documentObjectIdentifier' => $documentObjectIdentifier)); |
|
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | /** |
@@ -623,10 +623,10 @@ discard block |
||
| 623 | 623 | $message, |
| 624 | 624 | '', |
| 625 | 625 | $severity, |
| 626 | - true |
|
| 626 | + TRUE |
|
| 627 | 627 | ); |
| 628 | 628 | |
| 629 | - $this->redirect('list', 'Document', null); |
|
| 629 | + $this->redirect('list', 'Document', NULL); |
|
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | } |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | * The TYPO3 project - inspiring people to share! |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -class PluginSettings |
|
| 18 | -{ |
|
| 17 | +class PluginSettings { |
|
| 19 | 18 | /** |
| 20 | 19 | * |
| 21 | 20 | * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface |
@@ -28,8 +27,7 @@ discard block |
||
| 28 | 27 | * |
| 29 | 28 | * @return mixed |
| 30 | 29 | */ |
| 31 | - public function getSettings() |
|
| 32 | - { |
|
| 30 | + public function getSettings() { |
|
| 33 | 31 | $frameworkConfiguration = $this->configurationManager->getConfiguration( |
| 34 | 32 | \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK |
| 35 | 33 | ); |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | * The TYPO3 project - inspiring people to share! |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -class DocumentCleaner |
|
| 18 | -{ |
|
| 17 | +class DocumentCleaner { |
|
| 19 | 18 | |
| 20 | 19 | /** |
| 21 | 20 | * clientRepository |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * @param \EWW\Dpf\Domain\Model\Document $openedDocument |
| 56 | 55 | * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException |
| 57 | 56 | */ |
| 58 | - public function cleanUpDocuments($actionMethodName, $controllerClass) |
|
| 59 | - { |
|
| 57 | + public function cleanUpDocuments($actionMethodName, $controllerClass) { |
|
| 60 | 58 | $excludeActions = [ |
| 61 | 59 | \EWW\Dpf\Controller\DocumentController::class => [ |
| 62 | 60 | 'showDetailsAction', |
@@ -105,8 +103,7 @@ discard block |
||
| 105 | 103 | * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException |
| 106 | 104 | * @throws \TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException |
| 107 | 105 | */ |
| 108 | - protected function cleanUpOutdatedTemporaryDocuments() |
|
| 109 | - { |
|
| 106 | + protected function cleanUpOutdatedTemporaryDocuments() { |
|
| 110 | 107 | // Remove outdated temporary documents from the document table. |
| 111 | 108 | $outdatedTemporaryDocuments = $this->documentRepository->findOutdatedTemporaryDocuments(3600); |
| 112 | 109 | foreach ($outdatedTemporaryDocuments as $outdatedTemporaryDocument) { |
@@ -119,8 +116,7 @@ discard block |
||
| 119 | 116 | /** |
| 120 | 117 | * Unlocks all editing locks of the current user. |
| 121 | 118 | */ |
| 122 | - protected function cleanUpEditingLocks($actionMethodName, $controllerClass) |
|
| 123 | - { |
|
| 119 | + protected function cleanUpEditingLocks($actionMethodName, $controllerClass) { |
|
| 124 | 120 | $excludeActions = [ |
| 125 | 121 | \EWW\Dpf\Controller\DocumentController::class => [ |
| 126 | 122 | 'duplicateAction' |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @var \EWW\Dpf\Domain\Repository\DocumentRepository |
| 24 | 24 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 25 | 25 | */ |
| 26 | - protected $documentRepository = null; |
|
| 26 | + protected $documentRepository = NULL; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * editingLockService |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @var \EWW\Dpf\Services\Document\EditingLockService |
| 32 | 32 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 33 | 33 | */ |
| 34 | - protected $editingLockService = null; |
|
| 34 | + protected $editingLockService = NULL; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * persistence manager |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @var \EWW\Dpf\Security\Security |
| 48 | 48 | * @TYPO3\CMS\Extbase\Annotation\Inject |
| 49 | 49 | */ |
| 50 | - protected $security = null; |
|
| 50 | + protected $security = NULL; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * @param string $actionMethodName |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | if (!$response->hasErrors() && $response->code == 201) { |
| 82 | 82 | return $this->getRemoteDocumentId($response); |
| 83 | 83 | } else { |
| 84 | - TransferLogger::Log('INGEST', $document->getUid(), null, $response); |
|
| 84 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $response); |
|
| 85 | 85 | throw new \EWW\Dpf\Exceptions\IngestDocumentErrorException("Fedora error while ingest document."); |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | catch (\Exception $exception) { |
| 89 | - TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
|
| 89 | + TransferLogger::Log('INGEST', $document->getUid(), NULL, $exception->getMessage()); |
|
| 90 | 90 | |
| 91 | 91 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 92 | 92 | $message = $exception->getMessage(); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - return null; |
|
| 99 | + return NULL; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | throw new \EWW\Dpf\Exceptions\UpdateDocumentErrorException("Fedora error while update document."); |
| 130 | 130 | } |
| 131 | 131 | } catch (\Exception $exception) { |
| 132 | - TransferLogger::Log('UPDATE', $document->getUid(), null, $exception->getMessage()); |
|
| 132 | + TransferLogger::Log('UPDATE', $document->getUid(), NULL, $exception->getMessage()); |
|
| 133 | 133 | |
| 134 | 134 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 135 | 135 | $message = $exception->getMessage(); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - return null; |
|
| 142 | + return NULL; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -162,11 +162,11 @@ discard block |
||
| 162 | 162 | if (!$response->hasErrors() && $response->code == 200) { |
| 163 | 163 | return $response->__toString(); |
| 164 | 164 | } else { |
| 165 | - TransferLogger::Log('RETRIEVE', null, $remoteId, $response); |
|
| 165 | + TransferLogger::Log('RETRIEVE', NULL, $remoteId, $response); |
|
| 166 | 166 | throw new \EWW\Dpf\Exceptions\RetrieveDocumentErrorException("Fedora has returned an error."); |
| 167 | 167 | } |
| 168 | 168 | } catch (\Exception $exception) { |
| 169 | - TransferLogger::Log('RETRIEVE', null, $remoteId, $exception->getMessage()); |
|
| 169 | + TransferLogger::Log('RETRIEVE', NULL, $remoteId, $exception->getMessage()); |
|
| 170 | 170 | |
| 171 | 171 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 172 | 172 | $message = $exception->getMessage(); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - return null; |
|
| 179 | + return NULL; |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -199,11 +199,11 @@ discard block |
||
| 199 | 199 | if (!$response->hasErrors() && $response->code == 200) { |
| 200 | 200 | return $response->__toString(); |
| 201 | 201 | } else { |
| 202 | - TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, null, $response); |
|
| 202 | + TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, NULL, $response); |
|
| 203 | 203 | throw new \EWW\Dpf\Exceptions\NextDocumentIdErrorException("Fedora error while getting a document id."); |
| 204 | 204 | } |
| 205 | 205 | } catch (\Exception $exception) { |
| 206 | - TransferLogger::Log('GET_NEXT_DOCUMENT_ID', null, null, $exception->getMessage()); |
|
| 206 | + TransferLogger::Log('GET_NEXT_DOCUMENT_ID', NULL, NULL, $exception->getMessage()); |
|
| 207 | 207 | |
| 208 | 208 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 209 | 209 | $message = $exception->getMessage(); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - return null; |
|
| 216 | + return NULL; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | // if transfer successful |
| 241 | 241 | if (!$response->hasErrors() && $response->code == 204) { |
| 242 | - return true; |
|
| 242 | + return TRUE; |
|
| 243 | 243 | } else { |
| 244 | 244 | TransferLogger::Log('DELETE', $document->getUid(), $remoteId, $response); |
| 245 | 245 | switch ($state) { |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | } catch (\Exception $exception) { |
| 258 | - TransferLogger::Log('DELETE', $document->getUid(), null, $exception->getMessage()); |
|
| 258 | + TransferLogger::Log('DELETE', $document->getUid(), NULL, $exception->getMessage()); |
|
| 259 | 259 | |
| 260 | 260 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
| 261 | 261 | $message = $exception->getMessage(); |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - return false; |
|
| 268 | + return FALSE; |
|
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | /** |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | return $objectIdentifier; |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | - return null; |
|
| 292 | + return NULL; |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | protected function getOwnerId($pid = NULL) |
@@ -34,11 +34,11 @@ |
||
| 34 | 34 | protected $documentTransferLogRepository; |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * clientConfigurationManager |
|
| 38 | - * |
|
| 39 | - * @var \EWW\Dpf\Configuration\ClientConfigurationManager |
|
| 40 | - * @TYPO3\CMS\Extbase\Annotation\Inject |
|
| 41 | - */ |
|
| 37 | + * clientConfigurationManager |
|
| 38 | + * |
|
| 39 | + * @var \EWW\Dpf\Configuration\ClientConfigurationManager |
|
| 40 | + * @TYPO3\CMS\Extbase\Annotation\Inject |
|
| 41 | + */ |
|
| 42 | 42 | protected $clientConfigurationManager; |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | protected $response; |
| 53 | 53 | |
| 54 | - protected $errors = array(); |
|
| 54 | + protected $errors = array (); |
|
| 55 | 55 | |
| 56 | 56 | const X_ON_BEHALF_OF = 'X-On-Behalf-Of'; |
| 57 | 57 | |
| 58 | 58 | protected function getFedoraType() |
| 59 | 59 | { |
| 60 | - return 'application/vnd.'. $this->clientConfigurationManager->getFedoraNamespace().'.mets+xml'; |
|
| 60 | + return 'application/vnd.' . $this->clientConfigurationManager->getFedoraNamespace() . '.mets+xml'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | $remoteId = $document->getObjectIdentifier(); |
| 246 | 246 | |
| 247 | - $stateParam = ($state)? "?" . $state : ""; |
|
| 247 | + $stateParam = ($state) ? "?" . $state : ""; |
|
| 248 | 248 | |
| 249 | 249 | try { |
| 250 | 250 | $response = Request::delete($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection() . "/" . $remoteId . $stateParam) |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | use \EWW\Dpf\Services\Logger\TransferLogger; |
| 23 | 23 | use \Httpful\Request; |
| 24 | 24 | |
| 25 | -class FedoraRepository implements Repository |
|
| 26 | -{ |
|
| 25 | +class FedoraRepository implements Repository { |
|
| 27 | 26 | |
| 28 | 27 | /** |
| 29 | 28 | * documentTransferLogRepository |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | |
| 56 | 55 | const X_ON_BEHALF_OF = 'X-On-Behalf-Of'; |
| 57 | 56 | |
| 58 | - protected function getFedoraType() |
|
| 59 | - { |
|
| 57 | + protected function getFedoraType() { |
|
| 60 | 58 | return 'application/vnd.'. $this->clientConfigurationManager->getFedoraNamespace().'.mets+xml'; |
| 61 | 59 | } |
| 62 | 60 | |
@@ -68,8 +66,7 @@ discard block |
||
| 68 | 66 | * @return string |
| 69 | 67 | * @throws \Exception |
| 70 | 68 | */ |
| 71 | - public function ingest($document, $metsXml) |
|
| 72 | - { |
|
| 69 | + public function ingest($document, $metsXml) { |
|
| 73 | 70 | try { |
| 74 | 71 | |
| 75 | 72 | $response = Request::post($this->clientConfigurationManager->getSwordHost() . "/sword/" . $this->getSWORDCollection()) |
@@ -88,8 +85,7 @@ discard block |
||
| 88 | 85 | TransferLogger::Log('INGEST', $document->getUid(), null, $response); |
| 89 | 86 | throw new \EWW\Dpf\Exceptions\IngestDocumentErrorException("Fedora error while ingest document."); |
| 90 | 87 | } |
| 91 | - } |
|
| 92 | - catch (\Exception $exception) { |
|
| 88 | + } catch (\Exception $exception) { |
|
| 93 | 89 | TransferLogger::Log('INGEST', $document->getUid(), null, $exception->getMessage()); |
| 94 | 90 | |
| 95 | 91 | if ($exception instanceof \Httpful\Exception\ConnectionErrorException) { |
@@ -111,8 +107,7 @@ discard block |
||
| 111 | 107 | * @return string |
| 112 | 108 | * @throws \Exception |
| 113 | 109 | */ |
| 114 | - public function update($document, $metsXml) |
|
| 115 | - { |
|
| 110 | + public function update($document, $metsXml) { |
|
| 116 | 111 | |
| 117 | 112 | $remoteId = $document->getObjectIdentifier(); |
| 118 | 113 | |
@@ -153,8 +148,7 @@ discard block |
||
| 153 | 148 | * @return string |
| 154 | 149 | * @throws \Exception |
| 155 | 150 | */ |
| 156 | - public function retrieve($remoteId) |
|
| 157 | - { |
|
| 151 | + public function retrieve($remoteId) { |
|
| 158 | 152 | try { |
| 159 | 153 | $response = Request::get( |
| 160 | 154 | $this->clientConfigurationManager->getFedoraHost() |
@@ -196,8 +190,7 @@ discard block |
||
| 196 | 190 | * @return string |
| 197 | 191 | * @throws \Exception |
| 198 | 192 | */ |
| 199 | - public function getNextDocumentId() |
|
| 200 | - { |
|
| 193 | + public function getNextDocumentId() { |
|
| 201 | 194 | try { |
| 202 | 195 | $response = Request::get( |
| 203 | 196 | $this->clientConfigurationManager->getFedoraHost() |
@@ -239,8 +232,7 @@ discard block |
||
| 239 | 232 | * @return boolean |
| 240 | 233 | * @throws \Exception |
| 241 | 234 | */ |
| 242 | - public function delete($document, $state) |
|
| 243 | - { |
|
| 235 | + public function delete($document, $state) { |
|
| 244 | 236 | |
| 245 | 237 | $remoteId = $document->getObjectIdentifier(); |
| 246 | 238 | |
@@ -289,8 +281,7 @@ discard block |
||
| 289 | 281 | * @param \Httpful\Response $response |
| 290 | 282 | * @return string |
| 291 | 283 | */ |
| 292 | - protected function getRemoteDocumentId($response) |
|
| 293 | - { |
|
| 284 | + protected function getRemoteDocumentId($response) { |
|
| 294 | 285 | |
| 295 | 286 | // Get repository ID and write into document |
| 296 | 287 | $responseDom = new \DOMDocument(); |
@@ -307,8 +298,7 @@ discard block |
||
| 307 | 298 | return null; |
| 308 | 299 | } |
| 309 | 300 | |
| 310 | - protected function getOwnerId($pid = NULL) |
|
| 311 | - { |
|
| 301 | + protected function getOwnerId($pid = NULL) { |
|
| 312 | 302 | if ($pid) { |
| 313 | 303 | $this->clientConfigurationManager->setConfigurationPid($pid); |
| 314 | 304 | } |
@@ -321,8 +311,7 @@ discard block |
||
| 321 | 311 | return $ownerId; |
| 322 | 312 | } |
| 323 | 313 | |
| 324 | - protected function getSWORDCollection() |
|
| 325 | - { |
|
| 314 | + protected function getSWORDCollection() { |
|
| 326 | 315 | return $this->clientConfigurationManager->getSwordCollectionNamespace(); |
| 327 | 316 | } |
| 328 | 317 | } |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | use EWW\Dpf\Domain\Repository\DocumentRepository; |
| 10 | 10 | |
| 11 | 11 | |
| 12 | -class EmbargoTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask |
|
| 13 | -{ |
|
| 12 | +class EmbargoTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask { |
|
| 14 | 13 | |
| 15 | 14 | public function execute() { |
| 16 | 15 | |
@@ -23,11 +23,11 @@ |
||
| 23 | 23 | foreach ($embargoDocuments as $document) { |
| 24 | 24 | if ($currentDate > $document->getEmbargoDate()) { |
| 25 | 25 | |
| 26 | - if ($document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_ACTIVE OR |
|
| 27 | - $document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_DELETED OR |
|
| 28 | - $document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_INACTIVE OR |
|
| 29 | - $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_IN_PROGRESS OR |
|
| 30 | - $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_POSTPONED OR |
|
| 26 | + if ($document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_ACTIVE or |
|
| 27 | + $document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_DELETED or |
|
| 28 | + $document->getRemoteState() == DocumentWorkflow::REMOTE_STATE_INACTIVE or |
|
| 29 | + $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_IN_PROGRESS or |
|
| 30 | + $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_POSTPONED or |
|
| 31 | 31 | $document->getLocalState() == DocumentWorkflow::LOCAL_STATE_DISCARDED) { |
| 32 | 32 | // send message |
| 33 | 33 | $notifier = $objectManager->get(Notifier::class); |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Controller for the "workspace"/"my publications" area. |
| 21 | 21 | */ |
| 22 | -class UserController extends AbstractController |
|
| 23 | -{ |
|
| 22 | +class UserController extends AbstractController { |
|
| 24 | 23 | /** |
| 25 | 24 | * benutzerRepository |
| 26 | 25 | * |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->addFlashMessage( |
| 52 | 52 | LocalizationUtility::translate("manager.locallang.user.settings.message.invalidFisId", "dpf"), |
| 53 | 53 | '', |
| 54 | - $severity,false |
|
| 54 | + $severity, false |
|
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->addFlashMessage( |
| 62 | 62 | LocalizationUtility::translate("manager.locallang.user.settings.message.successfullySaved", "dpf"), |
| 63 | 63 | '', |
| 64 | - $severity,false |
|
| 64 | + $severity, false |
|
| 65 | 65 | ); |
| 66 | 66 | |
| 67 | 67 | $this->forward('settings'); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->addFlashMessage( |
| 52 | 52 | LocalizationUtility::translate("manager.locallang.user.settings.message.invalidFisId", "dpf"), |
| 53 | 53 | '', |
| 54 | - $severity,false |
|
| 54 | + $severity,FALSE |
|
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->addFlashMessage( |
| 62 | 62 | LocalizationUtility::translate("manager.locallang.user.settings.message.successfullySaved", "dpf"), |
| 63 | 63 | '', |
| 64 | - $severity,false |
|
| 64 | + $severity,FALSE |
|
| 65 | 65 | ); |
| 66 | 66 | |
| 67 | 67 | $this->forward('settings'); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | $temporaryColumns = array ( |
| 20 | 20 | 'stored_searches' => [ |
| 21 | - 'exclude' => true, |
|
| 21 | + 'exclude' => TRUE, |
|
| 22 | 22 | 'label' => 'stored_searches', |
| 23 | 23 | 'config' => [ |
| 24 | 24 | 'type' => 'inline', |
@@ -86,28 +86,28 @@ |
||
| 86 | 86 | ), |
| 87 | 87 | ) |
| 88 | 88 | ), |
| 89 | - 'fis_pers_id' => array( |
|
| 89 | + 'fis_pers_id' => array ( |
|
| 90 | 90 | 'exclude' => 0, |
| 91 | 91 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feuser.fis_pers_id', |
| 92 | - 'config' => array( |
|
| 92 | + 'config' => array ( |
|
| 93 | 93 | 'type' => 'input', |
| 94 | 94 | 'size' => '30', |
| 95 | 95 | 'eval' => 'trim', |
| 96 | 96 | ), |
| 97 | 97 | ), |
| 98 | - 'orga_name' => array( |
|
| 98 | + 'orga_name' => array ( |
|
| 99 | 99 | 'exclude' => 0, |
| 100 | 100 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feuser.orga_name', |
| 101 | - 'config' => array( |
|
| 101 | + 'config' => array ( |
|
| 102 | 102 | 'type' => 'input', |
| 103 | 103 | 'size' => '30', |
| 104 | 104 | 'eval' => 'trim', |
| 105 | 105 | ), |
| 106 | 106 | ), |
| 107 | - 'api_token' => array( |
|
| 107 | + 'api_token' => array ( |
|
| 108 | 108 | 'exclude' => 0, |
| 109 | 109 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feuser.api_token', |
| 110 | - 'config' => array( |
|
| 110 | + 'config' => array ( |
|
| 111 | 111 | 'type' => 'input', |
| 112 | 112 | 'size' => '30', |
| 113 | 113 | 'eval' => 'trim', |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - // $GLOBALS['TYPO3_DB']->sql_query("ALTER TABLE tx_dpf_domain_model_documenttype CHANGE virtual zzz_deleted_virtual SMALLINT UNSIGNED DEFAULT 0 NOT NULL"); |
|
| 149 | + // $GLOBALS['TYPO3_DB']->sql_query("ALTER TABLE tx_dpf_domain_model_documenttype CHANGE virtual zzz_deleted_virtual SMALLINT UNSIGNED DEFAULT 0 NOT NULL"); |
|
| 150 | 150 | |
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function access() { |
| 32 | 32 | $registry = GeneralUtility::makeInstance(Registry::class); |
| 33 | - $version = $registry->get('tx_dpf','updatescript-'.self::VERSION); |
|
| 33 | + $version = $registry->get('tx_dpf', 'updatescript-' . self::VERSION); |
|
| 34 | 34 | |
| 35 | 35 | // If the version has already been registered in the table sys_register the updatscript will be blocked. |
| 36 | 36 | if ($version) { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function main() { |
| 44 | 44 | // This script registers itself into the sys_registry table to prevent a re-run with the same version number. |
| 45 | 45 | $registry = GeneralUtility::makeInstance(Registry::class); |
| 46 | - $version = $registry->get('tx_dpf','updatescript-'.self::VERSION); |
|
| 46 | + $version = $registry->get('tx_dpf', 'updatescript-' . self::VERSION); |
|
| 47 | 47 | if ($version) { |
| 48 | 48 | return FALSE; |
| 49 | 49 | } else { |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | (new UpdateVirtualType)->execute(); |
| 56 | 56 | //$GLOBALS['TYPO3_DB']->sql_query("update tx_dpf_domain_model_document set creator = owner"); |
| 57 | 57 | } catch (\Throwable $throwable) { |
| 58 | - return "Error while updating the extension: ".($throwable->getMessage()); |
|
| 58 | + return "Error while updating the extension: " . ($throwable->getMessage()); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - $registry->set('tx_dpf','updatescript-'.self::VERSION,TRUE); |
|
| 61 | + $registry->set('tx_dpf', 'updatescript-' . self::VERSION, TRUE); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | return "The extension has been successfully updated."; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | foreach ($repository->crossClientFindAll() as $record) { |
| 124 | 124 | if ($record['backend_only']) { |
| 125 | 125 | $recordObject = $repository->findByUid($record['uid']); |
| 126 | - $recordObject->setAccessRestrictionRoles(array(Security::ROLE_LIBRARIAN, Security::ROLE_RESEARCHER)); |
|
| 126 | + $recordObject->setAccessRestrictionRoles(array (Security::ROLE_LIBRARIAN, Security::ROLE_RESEARCHER)); |
|
| 127 | 127 | $repository->update($recordObject); |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -66,16 +66,14 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | |
| 69 | -class UpdateState |
|
| 70 | -{ |
|
| 69 | +class UpdateState { |
|
| 71 | 70 | const OBJECT_STATE_NEW = "NEW"; |
| 72 | 71 | const OBJECT_STATE_ACTIVE = "ACTIVE"; |
| 73 | 72 | const OBJECT_STATE_INACTIVE = "INACTIVE"; |
| 74 | 73 | const OBJECT_STATE_DELETED = "DELETED"; |
| 75 | 74 | const OBJECT_STATE_LOCALLY_DELETED = "LOCALLY_DELETED"; |
| 76 | 75 | |
| 77 | - public function execute() |
|
| 78 | - { |
|
| 76 | + public function execute() { |
|
| 79 | 77 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
| 80 | 78 | $documentRepository = $objectManager->get(DocumentRepository::class); |
| 81 | 79 | |
@@ -110,8 +108,7 @@ discard block |
||
| 110 | 108 | } |
| 111 | 109 | } |
| 112 | 110 | |
| 113 | -class UpdateAccessRestrictions |
|
| 114 | -{ |
|
| 111 | +class UpdateAccessRestrictions { |
|
| 115 | 112 | public function execute() { |
| 116 | 113 | |
| 117 | 114 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |
@@ -131,8 +128,7 @@ discard block |
||
| 131 | 128 | } |
| 132 | 129 | } |
| 133 | 130 | |
| 134 | -class UpdateVirtualType |
|
| 135 | -{ |
|
| 131 | +class UpdateVirtualType { |
|
| 136 | 132 | public function execute() { |
| 137 | 133 | |
| 138 | 134 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |