mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-21 22:56:10 +01:00
Auto migrate code base to TYPO3 v10
Using: ./vendor/bin/typo3-rector process Classes Configuration ext_* Relates: #8092
This commit is contained in:
parent
00a37644b2
commit
b829a25738
19 changed files with 59 additions and 71 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Controller;
|
||||
|
||||
use Wrm\Events\Domain\Model\Date;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use Wrm\Events\Domain\Model\Dto\DateDemand;
|
||||
use Wrm\Events\Domain\Repository\CategoryRepository;
|
||||
|
@ -127,7 +128,7 @@ class DateController extends ActionController
|
|||
* @param \Wrm\Events\Domain\Model\Date $date
|
||||
* @return void
|
||||
*/
|
||||
public function showAction(\Wrm\Events\Domain\Model\Date $date)
|
||||
public function showAction(Date $date)
|
||||
{
|
||||
$this->view->assign('date', $date);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
/**
|
||||
* Date
|
||||
*/
|
||||
class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
class Date extends AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\Category;
|
||||
use \Wrm\Events\Domain\Repository\DateRepository;
|
||||
use \TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
@ -539,7 +541,7 @@ class Event extends AbstractEntity
|
|||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
* @return void
|
||||
*/
|
||||
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $images)
|
||||
public function setImages(FileReference $images)
|
||||
{
|
||||
$this->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);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
/***
|
||||
*
|
||||
* This file is part of the "DD Events" Extension for TYPO3 CMS.
|
||||
|
@ -15,7 +15,7 @@ namespace Wrm\Events\Domain\Model;
|
|||
/**
|
||||
* Organizer
|
||||
*/
|
||||
class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
class Organizer extends AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
/***
|
||||
*
|
||||
* This file is part of the "DD Events" Extension for TYPO3 CMS.
|
||||
|
@ -15,7 +15,7 @@ namespace Wrm\Events\Domain\Model;
|
|||
/**
|
||||
* Region
|
||||
*/
|
||||
class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
class Region extends AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
use Wrm\Events\Domain\Model\Dto\DateDemand;
|
||||
use Wrm\Events\Service\CategoryService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
@ -9,7 +10,7 @@ use TYPO3\CMS\Core\Database\ConnectionPool;
|
|||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
|
||||
class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class DateRepository extends Repository
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
/**
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
|
@ -20,7 +21,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
|
||||
class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class EventRepository extends Repository
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
/**
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
|
@ -16,7 +17,7 @@ namespace Wrm\Events\Domain\Repository;
|
|||
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
|
||||
class OrganizerRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class OrganizerRepository extends Repository
|
||||
{
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
/**
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
|
@ -16,7 +17,7 @@ namespace Wrm\Events\Domain\Repository;
|
|||
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
|
||||
class RegionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class RegionRepository extends Repository
|
||||
{
|
||||
|
||||
}
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
namespace Wrm\Events\Service;
|
||||
|
||||
use TYPO3\CMS\Extbase\Domain\Model\Category;
|
||||
use Wrm\Events\Domain\Model\Date;
|
||||
use Wrm\Events\Domain\Model\Organizer;
|
||||
use Wrm\Events\Domain\Model\Event;
|
||||
use TYPO3\CMS\Core\DataHandling\DataHandler;
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
use TYPO3\CMS\Core\Resource\FileRepository;
|
||||
use TYPO3\CMS\Core\Resource\Index\MetaDataRepository;
|
||||
|
@ -330,7 +335,7 @@ class DestinationDataImportService {
|
|||
$tmpSysCategory = $this->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();
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Wrm\Events\Command\DestinationDataImportCommand;
|
||||
use Wrm\Events\Command\RemoveAllCommand;
|
||||
use Wrm\Events\Command\RemovePastCommand;
|
||||
return [
|
||||
'events:destinationdataimport‚' => [
|
||||
'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
|
||||
],
|
||||
];
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
defined('TYPO3') or die();
|
||||
|
||||
call_user_func(function () {
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Events',
|
||||
'Pi1',
|
||||
'Events Plugin',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
|
@ -23,7 +23,7 @@ call_user_func(function () {
|
|||
/* Search Plugin */
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Events',
|
||||
'DateSearch',
|
||||
'Events: Date Search',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
|
@ -39,7 +39,7 @@ call_user_func(function () {
|
|||
/* Date List Plugin */
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Events',
|
||||
'DateList',
|
||||
'Events: Date List',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
|
@ -55,7 +55,7 @@ call_user_func(function () {
|
|||
/* Date Show Plugin */
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Events',
|
||||
'DateShow',
|
||||
'Events: Date Show',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
defined('TYPO3') or die();
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
|
||||
'dd_events',
|
||||
|
@ -14,4 +14,4 @@ defined('TYPO3_MODE') or die();
|
|||
'multiple' => true,
|
||||
]
|
||||
]
|
||||
);
|
||||
);
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -1,41 +1,29 @@
|
|||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
defined('TYPO3') || die('Access denied.');
|
||||
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Wrm.Events',
|
||||
'Events',
|
||||
'DateSearch',
|
||||
[
|
||||
'Date' => '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']
|
||||
);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
defined('TYPO3') || die('Access denied.');
|
||||
|
||||
call_user_func(
|
||||
function()
|
||||
|
|
Loading…
Reference in a new issue