diff --git a/Classes/Controller/DateController.php b/Classes/Controller/DateController.php index 511cdab..50e79fe 100644 --- a/Classes/Controller/DateController.php +++ b/Classes/Controller/DateController.php @@ -1,6 +1,7 @@ view->assign('date', $date); } diff --git a/Classes/Domain/Model/Date.php b/Classes/Domain/Model/Date.php index 84d596b..ff3b508 100644 --- a/Classes/Domain/Model/Date.php +++ b/Classes/Domain/Model/Date.php @@ -1,11 +1,11 @@ images = $images; } @@ -620,7 +622,7 @@ class Event extends AbstractEntity * @param \Wrm\Events\Domain\Model\Organizer $organizer * @return void */ - public function setOrganizer(\Wrm\Events\Domain\Model\Organizer $organizer) + public function setOrganizer(Organizer $organizer) { $this->organizer = $organizer; } @@ -637,7 +639,7 @@ class Event extends AbstractEntity * @param \Wrm\Events\Domain\Model\Region $region * @return void */ - public function setRegion(\Wrm\Events\Domain\Model\Region $region) + public function setRegion(Region $region) { $this->region = $region; } @@ -687,7 +689,7 @@ class Event extends AbstractEntity /** * @param \TYPO3\CMS\Extbase\Domain\Model\Category<\TYPO3\CMS\Extbase\Domain\Model\Category> $category */ - public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) + public function addCategory(Category $category) { $this->categories->attach($category); } diff --git a/Classes/Domain/Model/Organizer.php b/Classes/Domain/Model/Organizer.php index b0c73d0..3e4ce2e 100644 --- a/Classes/Domain/Model/Organizer.php +++ b/Classes/Domain/Model/Organizer.php @@ -1,7 +1,7 @@ sysCategoriesRepository->findOneByTitle($categoryTitle); if (!$tmpSysCategory) { $this->logger->info('Creating new category: ' . $categoryTitle); - $tmpSysCategory = $this->objectManager->get(\TYPO3\CMS\Extbase\Domain\Model\Category::class); + $tmpSysCategory = $this->objectManager->get(Category::class); $tmpSysCategory->setTitle($categoryTitle); $tmpSysCategory->setParent($sysParentCategory); $tmpSysCategory->setPid($this->sysCategoriesPid); @@ -371,7 +376,7 @@ class DestinationDataImportService { if (strtotime($date['start']) > $today) { $this->logger->info('Setup single date'); - $dateObj = $this->objectManager->get(\Wrm\Events\Domain\Model\Date::class); + $dateObj = $this->objectManager->get(Date::class); $start = new \DateTime($date['start'], new \DateTimeZone($date['tz'])); $end = new \DateTime($date['end'], new \DateTimeZone($date['tz'])); $this->logger->info('Start transformed ' . $start->format('Y-m-d H:i')); @@ -401,7 +406,7 @@ class DestinationDataImportService { $eventEnd = new \DateTime(); $eventEnd->setTimestamp($i); $eventEnd->setTime($until->format('H'), $until->format('i')); - $dateObj = $this->objectManager->get(\Wrm\Events\Domain\Model\Date::class); + $dateObj = $this->objectManager->get(Date::class); $dateObj->setLanguageUid(-1); $dateObj->setStart($eventStart); $dateObj->setEnd($eventEnd); @@ -427,7 +432,7 @@ class DestinationDataImportService { $eventEnd = new \DateTime(); $eventEnd->setTimestamp($i); $eventEnd->setTime($until->format('H'), $until->format('i')); - $dateObj = $this->objectManager->get(\Wrm\Events\Domain\Model\Date::class); + $dateObj = $this->objectManager->get(Date::class); $dateObj->setLanguageUid(-1); $dateObj->setStart($eventStart); $dateObj->setEnd($eventEnd); @@ -453,7 +458,7 @@ class DestinationDataImportService { $this->tmpCurrentEvent->setOrganizer($tmpOrganizer); continue; } - $tmpOrganizer = $this->objectManager->get(\Wrm\Events\Domain\Model\Organizer::class); + $tmpOrganizer = $this->objectManager->get(Organizer::class); $tmpOrganizer->setLanguageUid(-1); $tmpOrganizer->setName($address['name']); $tmpOrganizer->setCity($address['city']); @@ -587,7 +592,7 @@ class DestinationDataImportService { // New event is created $this->logger->info(substr($title, 0, 20) . ' does not exist'); - $event = $this->objectManager->get(\Wrm\Events\Domain\Model\Event::class); + $event = $this->objectManager->get(Event::class); // Create event and persist $event->setGlobalId($globalId); $event->setCategories(new ObjectStorage()); @@ -706,7 +711,7 @@ class DestinationDataImportService { $fieldname => $newId ); - $dataHandler = $this->objectManager->get(\TYPO3\CMS\Core\DataHandling\DataHandler::class); + $dataHandler = $this->objectManager->get(DataHandler::class); $dataHandler->start($data, array()); $dataHandler->process_datamap(); diff --git a/Configuration/Commands.php b/Configuration/Commands.php index 91b6d7f..11e5c0f 100644 --- a/Configuration/Commands.php +++ b/Configuration/Commands.php @@ -1,12 +1,16 @@ [ - 'class' => \Wrm\Events\Command\DestinationDataImportCommand::class + 'class' => DestinationDataImportCommand::class ], 'events:removeAll' => [ - 'class' => \Wrm\Events\Command\RemoveAllCommand::class + 'class' => RemoveAllCommand::class ], 'events:removePast' => [ - 'class' => \Wrm\Events\Command\RemovePastCommand::class + 'class' => RemovePastCommand::class ], ]; diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index ab4974d..eda0c55 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -1,11 +1,11 @@ true, ] ] -); \ No newline at end of file +); diff --git a/Configuration/TCA/tx_events_domain_model_date.php b/Configuration/TCA/tx_events_domain_model_date.php index 16d7b1e..05ebf39 100644 --- a/Configuration/TCA/tx_events_domain_model_date.php +++ b/Configuration/TCA/tx_events_domain_model_date.php @@ -19,9 +19,6 @@ return [ 'searchFields' => '', 'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_date.gif' ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, start, end', - ], 'types' => [ '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, start, end, event, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'], ], @@ -45,7 +42,6 @@ return [ ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => true, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', diff --git a/Configuration/TCA/tx_events_domain_model_event.php b/Configuration/TCA/tx_events_domain_model_event.php index c354a0e..4cdff31 100644 --- a/Configuration/TCA/tx_events_domain_model_event.php +++ b/Configuration/TCA/tx_events_domain_model_event.php @@ -19,9 +19,6 @@ return [ 'searchFields' => 'title,global_id,slug,teaser,details,price_info,street,district,city,zip,country,web,booking,ticket,facebook,youtube,latitude,longitude', 'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_event.gif' ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, global_id, slug, highlight, teaser, details, price_info, name, street, district, city, zip, country, phone, web, ticket, facebook, youtube, instagram, latitude, longitude, images, categories, dates, organizer, region', - ], 'types' => [ '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, global_id, slug, highlight, teaser, details, price_info, name, street, district, city, zip, country, phone, web, ticket, facebook, youtube, instagram, latitude, longitude, images, categories, dates, organizer, region, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'], ], @@ -45,7 +42,6 @@ return [ ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => true, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', diff --git a/Configuration/TCA/tx_events_domain_model_organizer.php b/Configuration/TCA/tx_events_domain_model_organizer.php index 4cf94db..3893357 100644 --- a/Configuration/TCA/tx_events_domain_model_organizer.php +++ b/Configuration/TCA/tx_events_domain_model_organizer.php @@ -19,9 +19,6 @@ return [ 'searchFields' => 'name,street,district,city,zip,phone,web,email', 'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_organizer.gif' ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, street, district, city, zip, phone, web, email', - ], 'types' => [ '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, street, district, city, zip, phone, web, email, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'], ], @@ -45,7 +42,6 @@ return [ ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => true, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', diff --git a/Configuration/TCA/tx_events_domain_model_region.php b/Configuration/TCA/tx_events_domain_model_region.php index b2cbaf8..027904e 100644 --- a/Configuration/TCA/tx_events_domain_model_region.php +++ b/Configuration/TCA/tx_events_domain_model_region.php @@ -19,9 +19,6 @@ return [ 'searchFields' => 'title', 'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_region.gif' ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title', - ], 'types' => [ '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'], ], @@ -45,7 +42,6 @@ return [ ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => true, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', diff --git a/ext_localconf.php b/ext_localconf.php index 672dd3b..b6ce6e3 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,41 +1,29 @@ 'search' - ], - [ - 'Date' => 'search' - ] + [\Wrm\Events\Controller\DateController::class => 'search'], + [\Wrm\Events\Controller\DateController::class => 'search'] ); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'Wrm.Events', + 'Events', 'DateList', - [ - 'Date' => 'list' - ], - [ - 'Date' => 'list' - ] + [\Wrm\Events\Controller\DateController::class => 'list'], + [\Wrm\Events\Controller\DateController::class => 'list'] ); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'Wrm.Events', + 'Events', 'DateShow', - [ - 'Date' => 'show' - ], - [ - 'Date' => 'show' - ] + [\Wrm\Events\Controller\DateController::class => 'show'], + [\Wrm\Events\Controller\DateController::class => 'show'] ); /* diff --git a/ext_tables.php b/ext_tables.php index 960f0f4..703a526 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -1,5 +1,5 @@