Merge branch 'feature/typo3-v10' into 'master'
State compatibility with v10 See merge request typo3/events!8
4
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
/vendor/
|
||||
/composer.lock
|
||||
/public/
|
||||
/vendor/
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Core\Bootstrap;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
|
||||
use Wrm\Events\Service\DestinationDataImportService;
|
||||
|
||||
class DestinationDataImportCommand extends Command {
|
||||
class DestinationDataImportCommand extends Command
|
||||
{
|
||||
|
||||
public function configure()
|
||||
{
|
||||
|
@ -31,12 +31,14 @@ class DestinationDataImportCommand extends Command {
|
|||
'What is the region uid?',
|
||||
'1'
|
||||
);
|
||||
$this->addArgument('rest-experience',
|
||||
$this->addArgument(
|
||||
'rest-experience',
|
||||
InputArgument::OPTIONAL,
|
||||
'What is the rest experience?',
|
||||
'stadtmarketing-erfurt'
|
||||
);
|
||||
$this->addArgument('files-folder',
|
||||
$this->addArgument(
|
||||
'files-folder',
|
||||
InputArgument::OPTIONAL,
|
||||
'Where to save the image files?',
|
||||
'staedte/erfurt/events/'
|
||||
|
@ -56,4 +58,4 @@ class DestinationDataImportCommand extends Command {
|
|||
$input->getArgument('files-folder')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
@ -21,8 +22,10 @@ class RemoveAllCommand extends Command
|
|||
{
|
||||
Bootstrap::initializeBackendAuthentication();
|
||||
|
||||
return GeneralUtility::makeInstance(ObjectManager::class)
|
||||
GeneralUtility::makeInstance(ObjectManager::class)
|
||||
->get(CleanupService::class)
|
||||
->deleteAllData();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
|
44
Classes/Controller/AbstractController.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Controller;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
|
||||
class AbstractController extends ActionController
|
||||
{
|
||||
/**
|
||||
* Extend original to also add data from current cobject if available.
|
||||
*/
|
||||
protected function resolveView()
|
||||
{
|
||||
$view = parent::resolveView();
|
||||
|
||||
$view->assign('data', []);
|
||||
$cObject = $this->configurationManager->getContentObject();
|
||||
if ($cObject instanceof ContentObjectRenderer && is_array($cObject->data)) {
|
||||
$view->assign('data', $cObject->data);
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
|
@ -1,19 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Controller;
|
||||
|
||||
use TYPO3\CMS\Core\Database\QueryGenerator;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use Wrm\Events\Domain\Model\Date;
|
||||
use Wrm\Events\Domain\Model\Dto\DateDemand;
|
||||
use Wrm\Events\Domain\Repository\CategoryRepository;
|
||||
use Wrm\Events\Domain\Repository\DateRepository;
|
||||
use Wrm\Events\Domain\Repository\RegionRepository;
|
||||
use TYPO3\CMS\Core\Database\QueryGenerator;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
use Wrm\Events\Service\DataProcessingForModels;
|
||||
|
||||
/**
|
||||
* DateController
|
||||
*/
|
||||
class DateController extends ActionController
|
||||
class DateController extends AbstractController
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -36,6 +39,11 @@ class DateController extends ActionController
|
|||
*/
|
||||
protected $queryGenerator;
|
||||
|
||||
/**
|
||||
* @var DataProcessingForModels
|
||||
*/
|
||||
protected $dataProcessing;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -56,11 +64,20 @@ class DateController extends ActionController
|
|||
$this->categoryRepository = $categoryRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DataProcessingForModels $dataProcessing
|
||||
*/
|
||||
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing)
|
||||
{
|
||||
$this->dataProcessing = $dataProcessing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action initializer
|
||||
*/
|
||||
protected function initializeAction()
|
||||
{
|
||||
$this->dataProcessing->setConfigurationManager($this->configurationManager);
|
||||
$this->pluginSettings = $this->configurationManager->getConfiguration(
|
||||
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
|
||||
);
|
||||
|
@ -124,10 +141,12 @@ class DateController extends ActionController
|
|||
/**
|
||||
* action show
|
||||
*
|
||||
* @Extbase\IgnoreValidation("date")
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
@ -147,6 +166,8 @@ class DateController extends ActionController
|
|||
$demand->setSortBy((string)$this->settings['sortByDate']);
|
||||
$demand->setSortOrder((string)$this->settings['sortOrder']);
|
||||
$demand->setHighlight((int)$this->settings['highlight']);
|
||||
$demand->setStart((string)$this->settings['start'] ?? '');
|
||||
$demand->setEnd((string)$this->settings['end'] ?? '');
|
||||
|
||||
if (!empty($this->settings['limit'])) {
|
||||
$demand->setLimit($this->settings['limit']);
|
||||
|
|
|
@ -1,130 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Controller;
|
||||
|
||||
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
||||
use Wrm\Events\Domain\Model\Dto\EventDemand;
|
||||
use Wrm\Events\Domain\Model\Dto\EventDemandFactory;
|
||||
use Wrm\Events\Domain\Model\Event;
|
||||
use Wrm\Events\Domain\Repository\EventRepository;
|
||||
use TYPO3\CMS\Core\Database\QueryGenerator;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
use Wrm\Events\Service\DataProcessingForModels;
|
||||
|
||||
/**
|
||||
* EventController
|
||||
*/
|
||||
|
||||
class EventController extends ActionController
|
||||
class EventController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @var EventRepository
|
||||
*/
|
||||
protected $eventRepository;
|
||||
|
||||
/**
|
||||
* @var eventRepository
|
||||
* @var DataProcessingForModels
|
||||
*/
|
||||
protected $eventRepository = null;
|
||||
protected $dataProcessing;
|
||||
|
||||
/**
|
||||
* @var QueryGenerator
|
||||
* @var EventDemandFactory
|
||||
*/
|
||||
protected $queryGenerator;
|
||||
protected $demandFactory;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $pluginSettings;
|
||||
|
||||
/**
|
||||
* @param EventRepository $eventRepository
|
||||
*/
|
||||
public function injectEventRepository(EventRepository $eventRepository)
|
||||
{
|
||||
public function __construct(
|
||||
EventRepository $eventRepository,
|
||||
DataProcessingForModels $dataProcessing,
|
||||
EventDemandFactory $demandFactory
|
||||
) {
|
||||
$this->eventRepository = $eventRepository;
|
||||
$this->dataProcessing = $dataProcessing;
|
||||
$this->demandFactory = $demandFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action initializer
|
||||
*/
|
||||
protected function initializeAction()
|
||||
{
|
||||
$this->pluginSettings = $this->configurationManager->getConfiguration(
|
||||
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
|
||||
);
|
||||
$this->dataProcessing->setConfigurationManager($this->configurationManager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Action list
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function listAction()
|
||||
public function listAction(): void
|
||||
{
|
||||
|
||||
$demand = $this->createDemandFromSettings();
|
||||
$demand = $this->demandFactory->fromSettings($this->settings);
|
||||
$events = $this->eventRepository->findByDemand($demand);
|
||||
$this->view->assign('events', $events);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Action show
|
||||
*
|
||||
* @param Event $event
|
||||
* @return void
|
||||
* @Extbase\IgnoreValidation("event")
|
||||
*/
|
||||
public function showAction(Event $event)
|
||||
public function showAction(Event $event): void
|
||||
{
|
||||
$this->view->assign('event', $event);
|
||||
}
|
||||
|
||||
/**
|
||||
* action teaser
|
||||
*
|
||||
* @return void
|
||||
* @deprecated Use listAction instead and configure settings properly.
|
||||
* Use Settings or something else to switch between list and teaser rendering.
|
||||
*/
|
||||
public function teaserAction()
|
||||
public function teaserAction(): void
|
||||
{
|
||||
$events = $this->eventRepository->findByUids($this->settings['eventUids']);
|
||||
$this->view->assign('events', $events);
|
||||
$this->view->assignMultiple([
|
||||
'events' => $this->eventRepository->findByUids($this->settings['eventUids']),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $search
|
||||
*/
|
||||
public function searchAction(): void
|
||||
public function searchAction(string $search = ''): void
|
||||
{
|
||||
$search = '';
|
||||
if ($this->request->hasArgument('search')) {
|
||||
$search = $this->request->getArgument('search');
|
||||
}
|
||||
|
||||
$this->view->assign('search', $search);
|
||||
$this->view->assign('events', $this->eventRepository->findSearchWord($search));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EventDemand
|
||||
*/
|
||||
|
||||
protected function createDemandFromSettings(): EventDemand
|
||||
{
|
||||
$demand = $this->objectManager->get(EventDemand::class);
|
||||
|
||||
$demand->setRegion((string)$this->settings['region']);
|
||||
|
||||
$demand->setCategories((string)$this->settings['categories']);
|
||||
$categoryCombination = (int)$this->settings['categoryCombination'] === 1 ? 'or' : 'and';
|
||||
|
||||
$demand->setCategoryCombination($categoryCombination);
|
||||
|
||||
$demand->setIncludeSubCategories((bool)$this->settings['includeSubcategories']);
|
||||
|
||||
$demand->setSortBy((string)$this->settings['sortByEvent']);
|
||||
$demand->setSortOrder((string)$this->settings['sortOrder']);
|
||||
|
||||
$demand->setHighlight((bool)$this->settings['highlight']);
|
||||
|
||||
if (!empty($this->settings['limit'])) {
|
||||
$demand->setLimit($this->settings['limit']);
|
||||
}
|
||||
|
||||
return $demand;
|
||||
}
|
||||
}
|
||||
|
|
40
Classes/Domain/Model/Category.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\Domain\Model\Category as ExtbaseCategory;
|
||||
|
||||
/**
|
||||
* Extend original model to include furher properties.
|
||||
*/
|
||||
class Category extends ExtbaseCategory
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $sorting = 0;
|
||||
|
||||
public function getSorting(): int
|
||||
{
|
||||
return $this->sorting;
|
||||
}
|
||||
}
|
|
@ -1,11 +1,13 @@
|
|||
<?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
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -18,11 +20,31 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
*/
|
||||
protected $end = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $canceled = "no";
|
||||
|
||||
/**
|
||||
* @var null|Date
|
||||
*/
|
||||
protected $postponedDate;
|
||||
|
||||
/**
|
||||
* @var null|Date
|
||||
*/
|
||||
protected $originalDate;
|
||||
|
||||
/**
|
||||
* @var \Wrm\Events\Domain\Model\Event
|
||||
*/
|
||||
protected $event = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $canceledLink = '';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -62,6 +84,8 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
$this->end = $end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return Event
|
||||
*/
|
||||
|
@ -83,15 +107,56 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
* @param int $languageUid
|
||||
* @return void
|
||||
*/
|
||||
public function setLanguageUid($languageUid) {
|
||||
public function setLanguageUid($languageUid)
|
||||
{
|
||||
$this->_languageUid = $languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLanguageUid() {
|
||||
public function getLanguageUid()
|
||||
{
|
||||
return $this->_languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCanceled(): string
|
||||
{
|
||||
return $this->canceled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $canceled
|
||||
* @return void
|
||||
*/
|
||||
public function setCanceled(string $canceled)
|
||||
{
|
||||
$this->canceled = $canceled;
|
||||
}
|
||||
|
||||
public function getPostponedDate(): ?Date
|
||||
{
|
||||
if ($this->getCanceled() === 'postponed') {
|
||||
return $this->postponedDate;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getOriginalDate(): ?Date
|
||||
{
|
||||
return $this->originalDate;
|
||||
}
|
||||
|
||||
public function getCanceledLink(): string
|
||||
{
|
||||
if ($this->getCanceled() === 'canceled') {
|
||||
return $this->canceledLink;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ namespace Wrm\Events\Domain\Model\Dto;
|
|||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class DateDemand {
|
||||
class DateDemand
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
namespace Wrm\Events\Domain\Model\Dto;
|
||||
|
||||
class EventDemand {
|
||||
class EventDemand
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
@ -44,6 +45,11 @@ class EventDemand {
|
|||
*/
|
||||
protected $limit = '';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $recordUids = [];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@ -172,6 +178,19 @@ class EventDemand {
|
|||
$this->limit = $limit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getRecordUids(): array
|
||||
{
|
||||
return $this->recordUids;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* @param array $recordUids
|
||||
*/
|
||||
public function setRecordUids(array $recordUids): void
|
||||
{
|
||||
$this->recordUids = $recordUids;
|
||||
}
|
||||
}
|
||||
|
|
58
Classes/Domain/Model/Dto/EventDemandFactory.php
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Model\Dto;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class EventDemandFactory
|
||||
{
|
||||
public function fromSettings(array $settings): EventDemand
|
||||
{
|
||||
/** @var EventDemand $demand */
|
||||
$demand = GeneralUtility::makeInstance(EventDemand::class);
|
||||
|
||||
$demand->setRegion((string)$settings['region']);
|
||||
|
||||
$demand->setCategories((string)$settings['categories']);
|
||||
|
||||
$categoryCombination = 'and';
|
||||
if ((int)$settings['categoryCombination'] === 1) {
|
||||
$categoryCombination = 'or';
|
||||
}
|
||||
$demand->setCategoryCombination($categoryCombination);
|
||||
|
||||
$demand->setIncludeSubCategories((bool)$settings['includeSubcategories']);
|
||||
|
||||
$demand->setSortBy((string)$settings['sortByEvent']);
|
||||
$demand->setSortOrder((string)$settings['sortOrder']);
|
||||
|
||||
$demand->setHighlight((bool)$settings['highlight']);
|
||||
|
||||
$demand->setRecordUids(GeneralUtility::intExplode(',', $settings['selectedRecords'], true));
|
||||
|
||||
if (!empty($settings['limit'])) {
|
||||
$demand->setLimit($settings['limit']);
|
||||
}
|
||||
|
||||
return $demand;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
use \Wrm\Events\Domain\Repository\DateRepository;
|
||||
use \TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
use \TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
use Wrm\Events\Domain\Repository\DateRepository;
|
||||
use Wrm\Events\Service\DataProcessingForModels;
|
||||
|
||||
/**
|
||||
* Event
|
||||
|
@ -16,91 +18,98 @@ class Event extends AbstractEntity
|
|||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* subtitle
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $subtitle = '';
|
||||
|
||||
/**
|
||||
* globalId
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $globalId = '';
|
||||
|
||||
/**
|
||||
* slug
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $slug = '';
|
||||
|
||||
/**
|
||||
* highlight
|
||||
*
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $highlight = false;
|
||||
|
||||
/**
|
||||
* teaser
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $teaser = '';
|
||||
|
||||
/**
|
||||
* details
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $details = '';
|
||||
|
||||
/**
|
||||
* priceInfo
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $priceInfo = '';
|
||||
|
||||
/**
|
||||
* name
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name = '';
|
||||
|
||||
/**
|
||||
* street
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $street = '';
|
||||
|
||||
/**
|
||||
* district
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $district = '';
|
||||
|
||||
/**
|
||||
* city
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $city = '';
|
||||
|
||||
/**
|
||||
* zip
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $zip = '';
|
||||
|
||||
/**
|
||||
* country
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $country = '';
|
||||
|
@ -114,102 +123,130 @@ class Event extends AbstractEntity
|
|||
|
||||
/**
|
||||
* web
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $web = '';
|
||||
|
||||
/**
|
||||
* ticket
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $ticket = '';
|
||||
|
||||
/**
|
||||
* facebook
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $facebook = '';
|
||||
|
||||
/**
|
||||
* youtube
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $youtube = '';
|
||||
|
||||
/**
|
||||
* instagram
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $instagram = '';
|
||||
|
||||
/**
|
||||
* latitude
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $latitude = '';
|
||||
|
||||
/**
|
||||
* longitude
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $longitude = '';
|
||||
|
||||
/**
|
||||
* images
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @cascade remove
|
||||
*
|
||||
* @var ObjectStorage<FileReference>
|
||||
* @Extbase\ORM\Cascade remove
|
||||
*/
|
||||
protected $images = null;
|
||||
protected $images;
|
||||
|
||||
/**
|
||||
* dates
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Wrm\Events\Domain\Model\Date>
|
||||
* @cascade remove
|
||||
*
|
||||
* @var ObjectStorage<Date>
|
||||
* @Extbase\ORM\Cascade remove
|
||||
*/
|
||||
protected $dates = null;
|
||||
protected $dates;
|
||||
|
||||
/**
|
||||
* organizer
|
||||
*
|
||||
*
|
||||
* @var \Wrm\Events\Domain\Model\Organizer
|
||||
*/
|
||||
protected $organizer = null;
|
||||
|
||||
/**
|
||||
* region
|
||||
*
|
||||
* @var \Wrm\Events\Domain\Model\Region
|
||||
*
|
||||
* @var Region
|
||||
*/
|
||||
protected $region = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $pages = '';
|
||||
|
||||
/**
|
||||
* categories
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
|
||||
*
|
||||
* @var ObjectStorage<Category>
|
||||
*/
|
||||
protected $categories;
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<Partner>
|
||||
*/
|
||||
protected $partner;
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<Event>
|
||||
*/
|
||||
protected $referencesEvents;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $_languageUid;
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @var DataProcessingForModels
|
||||
*/
|
||||
protected $dataProcessing = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->initStorageObjects();
|
||||
}
|
||||
|
||||
//Do not remove the next line: It would break the functionality
|
||||
/**
|
||||
* @param DataProcessingForModels $dataProcessing
|
||||
*/
|
||||
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing)
|
||||
{
|
||||
$this->dataProcessing = $dataProcessing;
|
||||
}
|
||||
|
||||
public function initializeObject()
|
||||
{
|
||||
$this->initStorageObjects();
|
||||
}
|
||||
|
||||
|
@ -218,12 +255,16 @@ class Event extends AbstractEntity
|
|||
*/
|
||||
protected function initStorageObjects()
|
||||
{
|
||||
$this->images = new ObjectStorage();
|
||||
$this->dates = new ObjectStorage();
|
||||
$this->categories = new ObjectStorage();
|
||||
$this->partner = new ObjectStorage();
|
||||
$this->referencesEvents = new ObjectStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the globalId
|
||||
*
|
||||
*
|
||||
* @return string $globalId
|
||||
*/
|
||||
public function getGlobalId()
|
||||
|
@ -257,6 +298,23 @@ class Event extends AbstractEntity
|
|||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $subtitle
|
||||
*/
|
||||
public function getSubtitle()
|
||||
{
|
||||
return $this->subtitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $subtitle
|
||||
* @return void
|
||||
*/
|
||||
public function setSubtitle($subtitle)
|
||||
{
|
||||
$this->subtitle = $subtitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $teaser
|
||||
*/
|
||||
|
@ -479,7 +537,7 @@ class Event extends AbstractEntity
|
|||
|
||||
/**
|
||||
* @return string $instagram
|
||||
*/
|
||||
*/
|
||||
public function getInstagram()
|
||||
{
|
||||
return $this->instagram;
|
||||
|
@ -487,12 +545,12 @@ class Event extends AbstractEntity
|
|||
|
||||
/**
|
||||
* @param string $instagram
|
||||
*/
|
||||
*/
|
||||
public function setInstagram(string $instagram)
|
||||
{
|
||||
$this->instagram = $instagram;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string $latitude
|
||||
*/
|
||||
|
@ -528,18 +586,18 @@ class Event extends AbstractEntity
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
* @return ObjectStorage<FileReference> $images
|
||||
*/
|
||||
public function getImages()
|
||||
public function getImages(): ObjectStorage
|
||||
{
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
* @param ObjectStorage<FileReference> $images
|
||||
* @return void
|
||||
*/
|
||||
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $images)
|
||||
public function setImages(FileReference $images)
|
||||
{
|
||||
$this->images = $images;
|
||||
}
|
||||
|
@ -604,7 +662,8 @@ class Event extends AbstractEntity
|
|||
* @param ObjectStorage $dates
|
||||
* @return void
|
||||
*/
|
||||
public function removeAllDates(ObjectStorage $dates) {
|
||||
public function removeAllDates(ObjectStorage $dates)
|
||||
{
|
||||
$this->dates->removeAll($dates);
|
||||
}
|
||||
|
||||
|
@ -616,11 +675,27 @@ class Event extends AbstractEntity
|
|||
return $this->organizer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ObjectStorage<Partner>
|
||||
*/
|
||||
public function getPartner(): ObjectStorage
|
||||
{
|
||||
return $this->partner;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ObjectStorage<Event>
|
||||
*/
|
||||
public function getReferencesEvents(): ObjectStorage
|
||||
{
|
||||
return $this->referencesEvents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 +712,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;
|
||||
}
|
||||
|
@ -684,20 +759,35 @@ class Event extends AbstractEntity
|
|||
$this->country = $country;
|
||||
}
|
||||
|
||||
public function getPages(): array
|
||||
{
|
||||
static $pages = null;
|
||||
if (is_array($pages)) {
|
||||
return $pages;
|
||||
}
|
||||
|
||||
$pages = $this->dataProcessing->process($this);
|
||||
|
||||
return $pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $categories
|
||||
*/
|
||||
public function getCategories()
|
||||
public function getCategories(): array
|
||||
{
|
||||
return $this->categories;
|
||||
$categories = $this->categories->toArray();
|
||||
|
||||
usort($categories, function (Category $catA, Category $catB) {
|
||||
return $catA->getSorting() <=> $catB->getSorting();
|
||||
});
|
||||
|
||||
return $categories;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -712,14 +802,24 @@ class Event extends AbstractEntity
|
|||
* @param int $languageUid
|
||||
* @return void
|
||||
*/
|
||||
public function setLanguageUid($languageUid) {
|
||||
public function setLanguageUid($languageUid)
|
||||
{
|
||||
$this->_languageUid = $languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLanguageUid() {
|
||||
public function getLanguageUid()
|
||||
{
|
||||
return $this->_languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLocalizedUid()
|
||||
{
|
||||
return $this->_localizedUid;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
|
||||
/***
|
||||
/*
|
||||
*
|
||||
* This file is part of the "DD Events" Extension for TYPO3 CMS.
|
||||
*
|
||||
|
@ -11,65 +11,68 @@ namespace Wrm\Events\Domain\Model;
|
|||
*
|
||||
* (c) 2019 Dirk Koritnik <koritnik@werkraum-media.de>
|
||||
*
|
||||
***/
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
|
||||
/**
|
||||
* Organizer
|
||||
*/
|
||||
class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
class Organizer extends AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* name
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name = '';
|
||||
|
||||
/**
|
||||
* street
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $street = '';
|
||||
|
||||
/**
|
||||
* district
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $district = '';
|
||||
|
||||
/**
|
||||
* city
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $city = '';
|
||||
|
||||
/**
|
||||
* zip
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $zip = '';
|
||||
|
||||
/**
|
||||
* phone
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $phone = '';
|
||||
|
||||
/**
|
||||
* web
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $web = '';
|
||||
|
||||
/**
|
||||
* email
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $email = '';
|
||||
|
@ -81,7 +84,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the name
|
||||
*
|
||||
*
|
||||
* @return string $name
|
||||
*/
|
||||
public function getName()
|
||||
|
@ -91,7 +94,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the name
|
||||
*
|
||||
*
|
||||
* @param string $name
|
||||
* @return void
|
||||
*/
|
||||
|
@ -102,7 +105,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the street
|
||||
*
|
||||
*
|
||||
* @return string $street
|
||||
*/
|
||||
public function getStreet()
|
||||
|
@ -112,7 +115,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the street
|
||||
*
|
||||
*
|
||||
* @param string $street
|
||||
* @return void
|
||||
*/
|
||||
|
@ -123,7 +126,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the district
|
||||
*
|
||||
*
|
||||
* @return string $district
|
||||
*/
|
||||
public function getDistrict()
|
||||
|
@ -133,7 +136,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the district
|
||||
*
|
||||
*
|
||||
* @param string $district
|
||||
* @return void
|
||||
*/
|
||||
|
@ -144,7 +147,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the city
|
||||
*
|
||||
*
|
||||
* @return string $city
|
||||
*/
|
||||
public function getCity()
|
||||
|
@ -154,7 +157,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the city
|
||||
*
|
||||
*
|
||||
* @param string $city
|
||||
* @return void
|
||||
*/
|
||||
|
@ -165,7 +168,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the zip
|
||||
*
|
||||
*
|
||||
* @return string $zip
|
||||
*/
|
||||
public function getZip()
|
||||
|
@ -175,7 +178,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the zip
|
||||
*
|
||||
*
|
||||
* @param string $zip
|
||||
* @return void
|
||||
*/
|
||||
|
@ -186,7 +189,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the phone
|
||||
*
|
||||
*
|
||||
* @return string $phone
|
||||
*/
|
||||
public function getPhone()
|
||||
|
@ -196,7 +199,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the phone
|
||||
*
|
||||
*
|
||||
* @param string $phone
|
||||
* @return void
|
||||
*/
|
||||
|
@ -207,7 +210,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the web
|
||||
*
|
||||
*
|
||||
* @return string $web
|
||||
*/
|
||||
public function getWeb()
|
||||
|
@ -217,7 +220,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the web
|
||||
*
|
||||
*
|
||||
* @param string $web
|
||||
* @return void
|
||||
*/
|
||||
|
@ -228,7 +231,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the email
|
||||
*
|
||||
*
|
||||
* @return string $email
|
||||
*/
|
||||
public function getEmail()
|
||||
|
@ -238,7 +241,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the email
|
||||
*
|
||||
*
|
||||
* @param string $email
|
||||
* @return void
|
||||
*/
|
||||
|
@ -262,7 +265,7 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function initStorageObjects()
|
||||
|
@ -273,14 +276,16 @@ class Organizer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
* @param int $languageUid
|
||||
* @return void
|
||||
*/
|
||||
public function setLanguageUid($languageUid) {
|
||||
public function setLanguageUid($languageUid)
|
||||
{
|
||||
$this->_languageUid = $languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLanguageUid() {
|
||||
public function getLanguageUid()
|
||||
{
|
||||
return $this->_languageUid;
|
||||
}
|
||||
}
|
||||
|
|
59
Classes/Domain/Model/Partner.php
Normal file
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
class Partner extends AbstractEntity
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $link = '';
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<FileReference>
|
||||
*/
|
||||
protected $images = null;
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function getLink(): string
|
||||
{
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
public function getImages(): ObjectStorage
|
||||
{
|
||||
return $this->images;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Model;
|
||||
|
||||
|
||||
/***
|
||||
/*
|
||||
*
|
||||
* This file is part of the "DD Events" Extension for TYPO3 CMS.
|
||||
*
|
||||
|
@ -11,20 +11,23 @@ namespace Wrm\Events\Domain\Model;
|
|||
*
|
||||
* (c) 2019 Dirk Koritnik <koritnik@werkraum-media.de>
|
||||
*
|
||||
***/
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
|
||||
/**
|
||||
* Region
|
||||
*/
|
||||
class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
class Region extends AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -32,7 +35,7 @@ class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle()
|
||||
|
@ -42,7 +45,7 @@ class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
|
@ -66,7 +69,7 @@ class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function initStorageObjects()
|
||||
|
@ -77,14 +80,16 @@ class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||
* @param int $languageUid
|
||||
* @return void
|
||||
*/
|
||||
public function setLanguageUid($languageUid) {
|
||||
public function setLanguageUid($languageUid)
|
||||
{
|
||||
$this->_languageUid = $languageUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getLanguageUid() {
|
||||
public function getLanguageUid()
|
||||
{
|
||||
return $this->_languageUid;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
|
||||
use Wrm\Events\Domain\Model\Dto\DateDemand;
|
||||
use Wrm\Events\Service\CategoryService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
use Wrm\Events\Domain\Model\Dto\DateDemand;
|
||||
use Wrm\Events\Service\CategoryService;
|
||||
|
||||
class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class DateRepository extends Repository
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -66,7 +68,7 @@ class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
|||
$constraints['region'] = $query->equals('event.region', $demand->getRegion());
|
||||
}
|
||||
|
||||
if ($demand->getHighlight() !== FALSE) {
|
||||
if ($demand->getHighlight() !== false) {
|
||||
$constraints['highlight'] = $query->equals('event.highlight', $demand->getHighlight());
|
||||
}
|
||||
|
||||
|
@ -78,14 +80,14 @@ class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
|||
$constraints['userCategories'] = $query->in('event.categories.uid', $demand->getUserCategories());
|
||||
}
|
||||
|
||||
if ($demand->getStart() !== '' && $demand->getEnd() != '') {
|
||||
$constraints['daterange'] = $query->logicalAnd(
|
||||
[
|
||||
$query->greaterThanOrEqual('start', $demand->getStart()),
|
||||
$query->lessThanOrEqual('end', $demand->getEnd())
|
||||
]
|
||||
);
|
||||
} else {
|
||||
if ($demand->getStart() !== '') {
|
||||
$constraints['starts'] = $query->greaterThanOrEqual('start', $demand->getStart());
|
||||
}
|
||||
if ($demand->getEnd() != '') {
|
||||
$constraints['ends'] = $query->lessThanOrEqual('end', $demand->getEnd());
|
||||
}
|
||||
|
||||
if ($demand->getStart() === '' && $demand->getEnd() === '') {
|
||||
$now = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
|
||||
$constraints['untilnow'] = $query->greaterThanOrEqual('start', $now);
|
||||
}
|
||||
|
@ -182,5 +184,4 @@ class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
|||
|
||||
return $statement->execute()->fetchAll();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
|
@ -14,76 +15,111 @@ namespace Wrm\Events\Domain\Repository;
|
|||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
use Wrm\Events\Domain\Model\Dto\EventDemand;
|
||||
use Wrm\Events\Service\CategoryService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
use Wrm\Events\Domain\Model\Dto\EventDemand;
|
||||
use Wrm\Events\Domain\Model\Event;
|
||||
use Wrm\Events\Service\CategoryService;
|
||||
|
||||
class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class EventRepository extends Repository
|
||||
{
|
||||
|
||||
/**
|
||||
* Find all products based on selected uids
|
||||
*
|
||||
* @param string $uids
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function findByUids($uids)
|
||||
public function findByUids(string $uids): QueryResultInterface
|
||||
{
|
||||
$uids = explode(',', $uids);
|
||||
|
||||
$query = $this->createQuery();
|
||||
//$query->getQuerySettings()->setRespectStoragePage(false);
|
||||
|
||||
$query->matching(
|
||||
$query->in('uid', $uids)
|
||||
);
|
||||
|
||||
//return $this->orderByField($query->execute(), $uids);
|
||||
$query->matching($query->in('uid', GeneralUtility::intExplode(',', $uids)));
|
||||
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EventDemand $demand
|
||||
* @return QueryResultInterface
|
||||
* @return QueryResultInterface|array
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
public function findByDemand(EventDemand $demand)
|
||||
{
|
||||
$query = $this->createDemandQuery($demand);
|
||||
|
||||
if ($demand->getRecordUids() !== [] && $demand->getSortBy() === 'default') {
|
||||
return $this->sortByDemand($query, $demand);
|
||||
}
|
||||
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EventDemand $demand
|
||||
* @return QueryInterface
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
protected function createDemandQuery(EventDemand $demand): QueryInterface
|
||||
{
|
||||
$query = $this->createQuery();
|
||||
$query = $this->setOrderings($query, $demand);
|
||||
|
||||
// sorting
|
||||
$sortBy = $demand->getSortBy();
|
||||
if ($sortBy && $sortBy !== 'singleSelection' && $sortBy !== 'default') {
|
||||
$order = strtolower($demand->getSortOrder()) === 'desc' ? QueryInterface::ORDER_DESCENDING : QueryInterface::ORDER_ASCENDING;
|
||||
$query->setOrderings([$sortBy => $order]);
|
||||
$constraints = $this->getConstraints($query, $demand);
|
||||
if (!empty($constraints)) {
|
||||
$query->matching($query->logicalAnd($constraints));
|
||||
}
|
||||
|
||||
if ($demand->getLimit() !== '') {
|
||||
$query->setLimit((int) $demand->getLimit());
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
private function setOrderings(QueryInterface $query, EventDemand $demand): QueryInterface
|
||||
{
|
||||
$sortBy = $demand->getSortBy();
|
||||
$sortingsToIgnore = ['singleSelection', 'default'];
|
||||
|
||||
if (!$sortBy || in_array($sortBy, $sortingsToIgnore)) {
|
||||
return $query;
|
||||
}
|
||||
|
||||
$order = QueryInterface::ORDER_ASCENDING;
|
||||
if (strtolower($demand->getSortOrder()) === 'desc') {
|
||||
$order = QueryInterface::ORDER_DESCENDING;
|
||||
}
|
||||
|
||||
$query->setOrderings([$sortBy => $order]);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
private function sortByDemand(QueryInterface $query, EventDemand $demand): array
|
||||
{
|
||||
$result = $query->execute()->toArray();
|
||||
$expectedSorting = $demand->getRecordUids();
|
||||
|
||||
usort($result, function (Event $eventA, Event $eventB) use ($expectedSorting) {
|
||||
$positionOfA = array_search($eventA->getUid(), $expectedSorting);
|
||||
if ($positionOfA === false) {
|
||||
$positionOfA = array_search($eventA->getLocalizedUid(), $expectedSorting);
|
||||
}
|
||||
|
||||
$positionOfB = array_search($eventB->getUid(), $expectedSorting);
|
||||
if ($positionOfB === false) {
|
||||
$positionOfB = array_search($eventB->getLocalizedUid(), $expectedSorting);
|
||||
}
|
||||
|
||||
return $positionOfA <=> $positionOfB;
|
||||
});
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function getConstraints(QueryInterface $query, EventDemand $demand): array
|
||||
{
|
||||
$constraints = [];
|
||||
|
||||
$categories = $demand->getCategories();
|
||||
if ($demand->getCategories()) {
|
||||
$constraints['categories'] = $this->createCategoryConstraint($query, $demand);
|
||||
}
|
||||
|
||||
if ($categories) {
|
||||
$categoryConstraints = $this->createCategoryConstraint($query, $categories, $demand->getIncludeSubCategories());
|
||||
if ($demand->getCategoryCombination() === 'or') {
|
||||
$constraints['categories'] = $query->logicalOr($categoryConstraints);
|
||||
} else {
|
||||
$constraints['categories'] = $query->logicalAnd($categoryConstraints);
|
||||
}
|
||||
if ($demand->getRecordUids() !== []) {
|
||||
$constraints['recordUids'] = $query->in('uid', $demand->getRecordUids());
|
||||
}
|
||||
|
||||
if ($demand->getRegion() !== '') {
|
||||
|
@ -94,53 +130,42 @@ class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
|||
$constraints['highlight'] = $query->equals('highlight', $demand->getHighlight());
|
||||
}
|
||||
|
||||
if ($demand->getLimit() !== '') {
|
||||
$query->setLimit((int) $demand->getLimit());
|
||||
}
|
||||
|
||||
if (!empty($constraints)) {
|
||||
$query->matching($query->logicalAnd($constraints));
|
||||
}
|
||||
return $query;
|
||||
return $constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param QueryInterface $query
|
||||
* @param string $categories
|
||||
* @param bool $includeSubCategories
|
||||
* @return array
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
protected function createCategoryConstraint(QueryInterface $query, $categories, bool $includeSubCategories = false): array
|
||||
protected function createCategoryConstraint(QueryInterface $query, EventDemand $demand): ConstraintInterface
|
||||
{
|
||||
$constraints = [];
|
||||
|
||||
if ($includeSubCategories) {
|
||||
$allCategories = GeneralUtility::intExplode(',', $demand->getCategories(), true);
|
||||
|
||||
if ($demand->getIncludeSubCategories()) {
|
||||
$categoryService = GeneralUtility::makeInstance(CategoryService::class);
|
||||
$allCategories = $categoryService->getChildrenCategories($categories);
|
||||
$allCategories = $categoryService->getChildrenCategories($demand->getCategories());
|
||||
if (!\is_array($allCategories)) {
|
||||
$allCategories = GeneralUtility::intExplode(',', $allCategories, true);
|
||||
}
|
||||
} else {
|
||||
$allCategories = GeneralUtility::intExplode(',', $categories, true);
|
||||
}
|
||||
|
||||
foreach ($allCategories as $category) {
|
||||
$constraints[] = $query->contains('categories', $category);
|
||||
}
|
||||
return $constraints;
|
||||
}
|
||||
|
||||
if ($demand->getCategoryCombination() === 'or') {
|
||||
return $query->logicalOr($constraints);
|
||||
}
|
||||
return $query->logicalAnd($constraints);
|
||||
}
|
||||
|
||||
public function findSearchWord($search)
|
||||
{
|
||||
$query = $this->createQuery();
|
||||
$query->matching(
|
||||
$query->like('title', '%' . $search . '%')
|
||||
);
|
||||
$query->matching($query->like('title', '%' . $search . '%'));
|
||||
$query->setOrderings(['title' => QueryInterface::ORDER_ASCENDING]);
|
||||
$query->setLimit(20);
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
|
@ -14,9 +15,9 @@ namespace Wrm\Events\Domain\Repository;
|
|||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
class OrganizerRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class OrganizerRepository extends Repository
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Domain\Repository;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
|
@ -14,9 +15,9 @@ namespace Wrm\Events\Domain\Repository;
|
|||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
class RegionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
class RegionRepository extends Repository
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
90
Classes/Extbase/AddSpecialProperties.php
Normal file
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Extbase;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Extbase\Event\Persistence\AfterObjectThawedEvent;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
|
||||
use Wrm\Events\Domain\Model\Date;
|
||||
|
||||
class AddSpecialProperties
|
||||
{
|
||||
/**
|
||||
* @var ConnectionPool
|
||||
*/
|
||||
private $connectionPool;
|
||||
|
||||
/**
|
||||
* @var DataMapper
|
||||
*/
|
||||
private $dataMapper;
|
||||
|
||||
/**
|
||||
* Internal info to speed things up if we know there are none.
|
||||
* @var bool
|
||||
*/
|
||||
private $doPostponedDatesExist = true;
|
||||
|
||||
public function __construct(
|
||||
ConnectionPool $connectionPool,
|
||||
DataMapper $dataMapper
|
||||
) {
|
||||
$this->connectionPool = $connectionPool;
|
||||
$this->dataMapper = $dataMapper;
|
||||
|
||||
$qb = $this->connectionPool->getQueryBuilderForTable('tx_events_domain_model_date');
|
||||
$qb->count('uid');
|
||||
$qb->from('tx_events_domain_model_date');
|
||||
$qb->where($qb->expr()->gt('postponed_date', $qb->createNamedParameter(0)));
|
||||
$this->doPostponedDatesExist = $qb->execute()->fetchColumn() > 0;
|
||||
}
|
||||
|
||||
public function __invoke(AfterObjectThawedEvent $event): void
|
||||
{
|
||||
if (
|
||||
$this->doPostponedDatesExist
|
||||
&& $event->getObject() instanceof Date
|
||||
) {
|
||||
/** @var Date $date */
|
||||
$date = $event->getObject();
|
||||
$date->_setProperty('originalDate', $this->getOriginalDate($date->_getProperty('_localizedUid')));
|
||||
}
|
||||
}
|
||||
|
||||
private function getOriginalDate(int $uidOfReferencedDate): ?Date
|
||||
{
|
||||
$qb = $this->connectionPool->getQueryBuilderForTable('tx_events_domain_model_date');
|
||||
$qb->select('*');
|
||||
$qb->from('tx_events_domain_model_date');
|
||||
$qb->where($qb->expr()->eq('postponed_date', $uidOfReferencedDate));
|
||||
$qb->setMaxResults(1);
|
||||
|
||||
$result = $qb->execute()->fetch();
|
||||
|
||||
if ($result === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$dates = $this->dataMapper->map(Date::class, [$result]);
|
||||
return $dates[0] ?? null;
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ class CategoryService
|
|||
public function __construct()
|
||||
{
|
||||
$this->timeTracker = GeneralUtility::makeInstance(TimeTracker::class);
|
||||
$this->cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_Events_category');
|
||||
$this->cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('events_category');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
176
Classes/Service/DataProcessingForModels.php
Normal file
|
@ -0,0 +1,176 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Service;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
|
||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
|
||||
/**
|
||||
* Used by models to apply data processing.
|
||||
* This allows for flexibility of integrators.
|
||||
*
|
||||
* E.g. pages are saved for each event.
|
||||
* An integrator now can resolve them via data processing to arrays or menus.
|
||||
*
|
||||
* dataProcessing is configured via TypoScript for each plugin or whole extension via
|
||||
* settings.dataProcessing.fqcn, e.g.:
|
||||
*
|
||||
* plugin.tx_events {
|
||||
* settings {
|
||||
* dataProcessing {
|
||||
* Wrm\Events\Domain\Model\Event {
|
||||
* 10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
* 10 {
|
||||
* special = list
|
||||
* special.value.field = pages
|
||||
* dataProcessing {
|
||||
* 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
|
||||
* 10 {
|
||||
* references.fieldName = media
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* Currently supported by:
|
||||
*
|
||||
* - Event->getPages()
|
||||
*/
|
||||
class DataProcessingForModels implements SingletonInterface
|
||||
{
|
||||
/**
|
||||
* @var ContentObjectRenderer
|
||||
*/
|
||||
private $cObject;
|
||||
|
||||
/**
|
||||
* @var ContentDataProcessor
|
||||
*/
|
||||
private $processorHandler;
|
||||
|
||||
/**
|
||||
* @var Connection
|
||||
*/
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
* @var DataMapFactory
|
||||
*/
|
||||
private $dataMapFactory;
|
||||
|
||||
/**
|
||||
* @var ConfigurationManagerInterface|null
|
||||
*/
|
||||
private $configurationManager;
|
||||
|
||||
/**
|
||||
* @var TypoScriptService
|
||||
*/
|
||||
private $typoScriptService;
|
||||
|
||||
public function __construct(
|
||||
ContentDataProcessor $processorHandler,
|
||||
ConnectionPool $connectionPool,
|
||||
DataMapFactory $dataMapFactory,
|
||||
TypoScriptService $typoScriptService
|
||||
) {
|
||||
$this->cObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
|
||||
$this->processorHandler = $processorHandler;
|
||||
$this->connection = $connectionPool->getConnectionByName('Default');
|
||||
$this->dataMapFactory = $dataMapFactory;
|
||||
$this->typoScriptService = $typoScriptService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to set current configuration from within plugin.
|
||||
*
|
||||
* Inject and call this method, e.g. within initializeAction.
|
||||
* Necessary to get plugin configuration containing dataProcessing configuration.
|
||||
*/
|
||||
public function setConfigurationManager(ConfigurationManagerInterface $configurationManager): void
|
||||
{
|
||||
$this->configurationManager = $configurationManager;
|
||||
}
|
||||
|
||||
public function process(
|
||||
AbstractEntity $entity
|
||||
): array {
|
||||
$configuration = $this->getConfiguration($entity);
|
||||
|
||||
if ($configuration === []) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$this->cObject->start($this->getData($entity), $this->getTable($entity));
|
||||
return $this->processorHandler->process($this->cObject, $configuration, []);
|
||||
}
|
||||
|
||||
private function getData(AbstractEntity $entity): array
|
||||
{
|
||||
$row = $this->connection->select(['*'], $this->getTable($entity), ['uid' => $entity->getUid()])->fetch();
|
||||
if (is_array($row)) {
|
||||
return $row;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
private function getTable(AbstractEntity $entity): string
|
||||
{
|
||||
$dataMap = $this->dataMapFactory->buildDataMap(get_class($entity));
|
||||
return $dataMap->getTableName();
|
||||
}
|
||||
|
||||
private function getConfiguration(AbstractEntity $entity): array
|
||||
{
|
||||
if ($this->configurationManager === null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$className = get_class($entity);
|
||||
$settings = $this->configurationManager->getConfiguration(
|
||||
ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS
|
||||
);
|
||||
|
||||
if (ArrayUtility::isValidPath($settings, 'dataProcessing.' . $className, '.') === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$configuration = ArrayUtility::getValueByPath($settings, 'dataProcessing.' . $className, '.');
|
||||
$configuration = $this->typoScriptService->convertPlainArrayToTypoScriptArray($configuration);
|
||||
return [
|
||||
'dataProcessing.' => $configuration,
|
||||
];
|
||||
}
|
||||
}
|
|
@ -3,28 +3,32 @@
|
|||
namespace Wrm\Events\Service;
|
||||
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
use TYPO3\CMS\Core\DataHandling\DataHandler;
|
||||
use TYPO3\CMS\Core\DataHandling\SlugHelper;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Log\LogManager;
|
||||
use TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException;
|
||||
use TYPO3\CMS\Core\Resource\FileRepository;
|
||||
use TYPO3\CMS\Core\Resource\Index\MetaDataRepository;
|
||||
use TYPO3\CMS\Core\Resource\ResourceFactory;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\DataHandling\SlugHelper;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Log\LogManager;
|
||||
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\Category;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
use Wrm\Events\Domain\Model\Date;
|
||||
use Wrm\Events\Domain\Model\Event;
|
||||
use Wrm\Events\Domain\Model\Organizer;
|
||||
use Wrm\Events\Domain\Repository\CategoryRepository;
|
||||
use Wrm\Events\Domain\Repository\DateRepository;
|
||||
use Wrm\Events\Domain\Repository\EventRepository;
|
||||
use Wrm\Events\Domain\Repository\OrganizerRepository;
|
||||
use Wrm\Events\Domain\Repository\RegionRepository;
|
||||
|
||||
|
||||
class DestinationDataImportService {
|
||||
class DestinationDataImportService
|
||||
{
|
||||
|
||||
/**
|
||||
* @var
|
||||
|
@ -205,7 +209,8 @@ class DestinationDataImportService {
|
|||
* @param $regionUid
|
||||
* @param $filesFolder
|
||||
*/
|
||||
public function import($restExperience, $storagePid, $regionUid, $filesFolder) {
|
||||
public function import($restExperience, $storagePid, $regionUid, $filesFolder)
|
||||
{
|
||||
|
||||
$this->restExperience = $restExperience;
|
||||
$this->storagePid = $storagePid;
|
||||
|
@ -232,21 +237,21 @@ class DestinationDataImportService {
|
|||
$restUrl = $this->restUrl . '?experience=' . $this->restExperience . '&licensekey=' . $this->restLicenseKey . '&type=' . $this->restType . '&mode=' . $this->restMode . '&limit=' . $this->restLimit . '&template=' . $this->restTemplate;
|
||||
$this->logger->info('Try to get data from ' . $restUrl);
|
||||
|
||||
if ($jsonResponse = json_decode(file_get_contents($restUrl),true)) {
|
||||
if ($jsonResponse = json_decode(file_get_contents($restUrl), true)) {
|
||||
$this->logger->info('Received data with ' . count($jsonResponse['items']) . ' items');
|
||||
return $this->processData($jsonResponse);
|
||||
} else {
|
||||
$this->logger->error('Could not receive data.');
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @return int
|
||||
*/
|
||||
public function processData($data) {
|
||||
public function processData($data)
|
||||
{
|
||||
|
||||
$this->logger->info('Processing json ' . count($data['items']));
|
||||
|
||||
|
@ -254,7 +259,6 @@ class DestinationDataImportService {
|
|||
$selectedRegion = $this->regionRepository->findByUid($this->regionUid);
|
||||
|
||||
foreach ($data['items'] as $event) {
|
||||
|
||||
$this->logger->info('Processing event ' . substr($event['title'], 0, 20));
|
||||
|
||||
// Event already exists? If not create one!
|
||||
|
@ -270,50 +274,59 @@ class DestinationDataImportService {
|
|||
$this->tmpCurrentEvent->setTitle(substr($event['title'], 0, 254));
|
||||
|
||||
// Set Highlight (Is only set in rest if true)
|
||||
if($event['highlight'])
|
||||
if ($event['highlight']) {
|
||||
$this->tmpCurrentEvent->setHighlight($event['highlight']);
|
||||
}
|
||||
|
||||
// Set Texts
|
||||
if($event['texts'])
|
||||
if ($event['texts']) {
|
||||
$this->setTexts($event['texts']);
|
||||
}
|
||||
|
||||
// Set address and geo data
|
||||
if($event['name'] || $event['street'] || $event['city'] || $event['zip'] || $event['country'] || $event['web'])
|
||||
if ($event['name'] || $event['street'] || $event['city'] || $event['zip'] || $event['country'] || $event['web']) {
|
||||
$this->setAddress($event);
|
||||
}
|
||||
|
||||
// Set LatLng
|
||||
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
|
||||
if ($event['geo']['main']['latitude'] && $event['geo']['main']['longitude']) {
|
||||
$this->setLatLng($event['geo']['main']['latitude'], $event['geo']['main']['longitude']);
|
||||
}
|
||||
|
||||
// Set Categories
|
||||
if($event['categories'])
|
||||
if ($event['categories']) {
|
||||
$this->setCategories($event['categories']);
|
||||
}
|
||||
|
||||
// Set Organizer
|
||||
if($event['addresses'])
|
||||
if ($event['addresses']) {
|
||||
$this->setOrganizer($event['addresses']);
|
||||
}
|
||||
|
||||
// Set Social
|
||||
if($event['media_objects'])
|
||||
if ($event['media_objects']) {
|
||||
$this->setSocial($event['media_objects']);
|
||||
}
|
||||
|
||||
// Set Tickets
|
||||
if($event['media_objects'])
|
||||
if ($event['media_objects']) {
|
||||
$this->setTickets($event['media_objects']);
|
||||
}
|
||||
|
||||
// Set Dates
|
||||
if($event['timeIntervals'])
|
||||
if ($event['timeIntervals']) {
|
||||
$this->setDates($event['timeIntervals']);
|
||||
}
|
||||
|
||||
// Set Assets
|
||||
if($event['media_objects'])
|
||||
if ($event['media_objects']) {
|
||||
$this->setAssets($event['media_objects']);
|
||||
}
|
||||
|
||||
// Update and persist
|
||||
$this->logger->info('Persist database');
|
||||
$this->eventRepository->update($this->tmpCurrentEvent);
|
||||
$this->persistenceManager->persistAll();
|
||||
|
||||
}
|
||||
$this->doSlugUpdate();
|
||||
$this->logger->info('Finished import');
|
||||
|
@ -324,13 +337,14 @@ class DestinationDataImportService {
|
|||
*
|
||||
* @param array $categories
|
||||
*/
|
||||
protected function setCategories(Array $categories) {
|
||||
protected function setCategories(array $categories)
|
||||
{
|
||||
$sysParentCategory = $this->sysCategoriesRepository->findByUid($this->categoryParentUid);
|
||||
foreach ($categories as $categoryTitle) {
|
||||
$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);
|
||||
|
@ -346,7 +360,8 @@ class DestinationDataImportService {
|
|||
* @param array $timeIntervals
|
||||
* @TODO: split into functions
|
||||
*/
|
||||
protected function setDates(Array $timeIntervals) {
|
||||
protected function setDates(array $timeIntervals)
|
||||
{
|
||||
|
||||
// @TODO: does not seem to work -->
|
||||
//$currentEventDates = $this->tmpCurrentEvent->getDates();
|
||||
|
@ -365,13 +380,11 @@ class DestinationDataImportService {
|
|||
$today = $today->getTimestamp();
|
||||
|
||||
foreach ($timeIntervals as $date) {
|
||||
|
||||
// Check if dates are given as interval or not
|
||||
if (empty($date['interval'])) {
|
||||
|
||||
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'));
|
||||
|
@ -382,18 +395,15 @@ class DestinationDataImportService {
|
|||
$dateObj->setEnd($end);
|
||||
$this->tmpCurrentEvent->addDate($dateObj);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if ($date['freq'] == 'Daily' && empty($date['weekdays']) && !empty($date['repeatUntil'])) {
|
||||
|
||||
$this->logger->info('Setup daily interval dates');
|
||||
$this->logger->info('Start ' . $date['start']);
|
||||
$this->logger->info('End ' . $date['repeatUntil']);
|
||||
$start = new \DateTime($date['start'], new \DateTimeZone($date['tz']));
|
||||
$until = new \DateTime($date['repeatUntil'], new \DateTimeZone($date['tz']));
|
||||
|
||||
for($i = strtotime($start->format('l'), $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 day', $i)) {
|
||||
for ($i = strtotime($start->format('l'), $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 day', $i)) {
|
||||
if ($i >= $today) {
|
||||
$eventStart = new \DateTime();
|
||||
$eventStart->setTimestamp($i);
|
||||
|
@ -401,17 +411,14 @@ 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);
|
||||
$this->tmpCurrentEvent->addDate($dateObj);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if ($date['freq'] == 'Weekly' && !empty($date['weekdays']) && !empty($date['repeatUntil'])) {
|
||||
} elseif ($date['freq'] == 'Weekly' && !empty($date['weekdays']) && !empty($date['repeatUntil'])) {
|
||||
foreach ($date['weekdays'] as $day) {
|
||||
$this->logger->info('Setup weekly interval dates for ' . $day);
|
||||
$this->logger->info('Start ' . $date['start']);
|
||||
|
@ -419,7 +426,7 @@ class DestinationDataImportService {
|
|||
$start = new \DateTime($date['start'], new \DateTimeZone($date['tz']));
|
||||
$until = new \DateTime($date['repeatUntil'], new \DateTimeZone($date['tz']));
|
||||
|
||||
for($i = strtotime($day, $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 week', $i)) {
|
||||
for ($i = strtotime($day, $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 week', $i)) {
|
||||
if ($i >= $today) {
|
||||
$eventStart = new \DateTime();
|
||||
$eventStart->setTimestamp($i);
|
||||
|
@ -427,7 +434,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);
|
||||
|
@ -444,16 +451,16 @@ class DestinationDataImportService {
|
|||
/**
|
||||
* @param array $addresses
|
||||
*/
|
||||
protected function setOrganizer(Array $addresses) {
|
||||
foreach ($addresses as $address)
|
||||
{
|
||||
protected function setOrganizer(array $addresses)
|
||||
{
|
||||
foreach ($addresses as $address) {
|
||||
if ($address['rel'] == "organizer") {
|
||||
$tmpOrganizer = $this->organizerRepository->findOneByName($address['name']);
|
||||
if ($tmpOrganizer) {
|
||||
$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']);
|
||||
|
@ -472,44 +479,55 @@ class DestinationDataImportService {
|
|||
/**
|
||||
* @param array $event
|
||||
*/
|
||||
protected function setAddress(Array $event) {
|
||||
if (!empty($event['name']))
|
||||
protected function setAddress(array $event)
|
||||
{
|
||||
if (!empty($event['name'])) {
|
||||
$this->tmpCurrentEvent->setName($event['name']);
|
||||
if (!empty($event['street']))
|
||||
}
|
||||
if (!empty($event['street'])) {
|
||||
$this->tmpCurrentEvent->setStreet($event['street']);
|
||||
if (!empty($event['city']))
|
||||
}
|
||||
if (!empty($event['city'])) {
|
||||
$this->tmpCurrentEvent->setCity($event['city']);
|
||||
if (!empty($event['zip']))
|
||||
}
|
||||
if (!empty($event['zip'])) {
|
||||
$this->tmpCurrentEvent->setZip($event['zip']);
|
||||
if (!empty($event['country']))
|
||||
}
|
||||
if (!empty($event['country'])) {
|
||||
$this->tmpCurrentEvent->setCountry($event['country']);
|
||||
if (!empty($event['phone']))
|
||||
}
|
||||
if (!empty($event['phone'])) {
|
||||
$this->tmpCurrentEvent->setPhone($event['phone']);
|
||||
if (!empty($event['web']))
|
||||
}
|
||||
if (!empty($event['web'])) {
|
||||
$this->tmpCurrentEvent->setWeb($event['web']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $media
|
||||
*/
|
||||
protected function setSocial(Array $media) {
|
||||
foreach ($media as $link)
|
||||
{
|
||||
if ($link['rel'] == "socialmedia" && $link['value'] == "Facebook")
|
||||
$this->tmpCurrentEvent->setFacebook($link['url']);
|
||||
if ($link['rel'] == "socialmedia" && $link['value'] == "YouTube")
|
||||
$this->tmpCurrentEvent->setYouTube($link['url']);
|
||||
if ($link['rel'] == "socialmedia" && $link['value'] == "Instagram")
|
||||
$this->tmpCurrentEvent->setInstagram($link['url']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $media
|
||||
*/
|
||||
protected function setTickets(Array $media) {
|
||||
foreach ($media as $link)
|
||||
{
|
||||
protected function setSocial(array $media)
|
||||
{
|
||||
foreach ($media as $link) {
|
||||
if ($link['rel'] == "socialmedia" && $link['value'] == "Facebook") {
|
||||
$this->tmpCurrentEvent->setFacebook($link['url']);
|
||||
}
|
||||
if ($link['rel'] == "socialmedia" && $link['value'] == "YouTube") {
|
||||
$this->tmpCurrentEvent->setYouTube($link['url']);
|
||||
}
|
||||
if ($link['rel'] == "socialmedia" && $link['value'] == "Instagram") {
|
||||
$this->tmpCurrentEvent->setInstagram($link['url']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $media
|
||||
*/
|
||||
protected function setTickets(array $media)
|
||||
{
|
||||
foreach ($media as $link) {
|
||||
if ($link['rel'] == "ticket") {
|
||||
$this->tmpCurrentEvent->setTicket($link['url']);
|
||||
break;
|
||||
|
@ -526,14 +544,15 @@ class DestinationDataImportService {
|
|||
* @param string $needle
|
||||
* @param array $haystack
|
||||
*/
|
||||
protected function multi_array_key_exists( $needle, $haystack ) {
|
||||
protected function multi_array_key_exists($needle, $haystack)
|
||||
{
|
||||
|
||||
foreach ( $haystack as $key => $value ) {
|
||||
if ( $needle == $key ) {
|
||||
foreach ($haystack as $key => $value) {
|
||||
if ($needle == $key) {
|
||||
return true;
|
||||
}
|
||||
if ( is_array( $value ) ) {
|
||||
if ( $this->multi_array_key_exists( $needle, $value ) == true ) {
|
||||
if (is_array($value)) {
|
||||
if ($this->multi_array_key_exists($needle, $value) == true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -545,7 +564,8 @@ class DestinationDataImportService {
|
|||
* @param string $lat
|
||||
* @param string $lng
|
||||
*/
|
||||
protected function setLatLng(String $lat, String $lng) {
|
||||
protected function setLatLng(string $lat, string $lng)
|
||||
{
|
||||
$this->tmpCurrentEvent->setLatitude($lat);
|
||||
$this->tmpCurrentEvent->setLongitude($lng);
|
||||
}
|
||||
|
@ -554,9 +574,9 @@ class DestinationDataImportService {
|
|||
* Set Texts
|
||||
* @param Array $texts
|
||||
*/
|
||||
protected function setTexts(Array $texts) {
|
||||
foreach ($texts as $text)
|
||||
{
|
||||
protected function setTexts(array $texts)
|
||||
{
|
||||
foreach ($texts as $text) {
|
||||
if ($text['rel'] == "details" && $text['type'] == "text/plain") {
|
||||
$this->tmpCurrentEvent->setDetails(str_replace('\n\n', '\n', $text['value']));
|
||||
}
|
||||
|
@ -574,7 +594,8 @@ class DestinationDataImportService {
|
|||
* @param String $globalId
|
||||
* @param String $title
|
||||
*/
|
||||
protected function getOrCreateEvent(String $globalId, String $title) {
|
||||
protected function getOrCreateEvent(string $globalId, string $title)
|
||||
{
|
||||
|
||||
$event = $this->eventRepository->findOneByGlobalId($globalId);
|
||||
|
||||
|
@ -587,7 +608,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());
|
||||
|
@ -600,16 +621,15 @@ class DestinationDataImportService {
|
|||
/**
|
||||
* @param array $assets
|
||||
*/
|
||||
protected function setAssets(Array $assets) {
|
||||
protected function setAssets(array $assets)
|
||||
{
|
||||
|
||||
$this->logger->info("Set assets");
|
||||
|
||||
$error = false;
|
||||
|
||||
foreach ($assets as $media_object)
|
||||
{
|
||||
if($media_object['rel'] == "default" && $media_object['type'] == "image/jpeg") {
|
||||
|
||||
foreach ($assets as $media_object) {
|
||||
if ($media_object['rel'] == "default" && $media_object['type'] == "image/jpeg") {
|
||||
$this->storage = $this->resourceFactory->getDefaultStorage();
|
||||
|
||||
$orgFileUrl = urldecode($media_object['url']);
|
||||
|
@ -637,24 +657,30 @@ class DestinationDataImportService {
|
|||
if ($file = $this->loadFile($orgFileUrl)) {
|
||||
// Move file to defined folder
|
||||
$this->logger->info('Adding file ' . $file);
|
||||
$this->storage->addFile($this->environment->getPublicPath() . "/uploads/tx_events/" . $file, $this->storage->getFolder($this->filesFolder));
|
||||
|
||||
try {
|
||||
$targetFolder = $this->storage->getFolder($this->filesFolder);
|
||||
} catch (FolderDoesNotExistException $e) {
|
||||
$targetFolder = $this->storage->createFolder($this->filesFolder);
|
||||
}
|
||||
|
||||
$this->storage->addFile($this->environment->getPublicPath() . "/uploads/tx_events/" . $file, $targetFolder);
|
||||
} else {
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($error !== true) {
|
||||
if ($this->tmpCurrentEvent->getImages() !== null) {
|
||||
if ($this->tmpCurrentEvent->getImages()->count() > 0) {
|
||||
$this->logger->info('Relation found');
|
||||
// TODO: How to delete file references?
|
||||
} else {
|
||||
$this->logger->info('No relation found');
|
||||
$file = $this->storage->getFile($this->filesFolder . $orgFileNameSanitized);
|
||||
$this->metaDataRepository->update($file->getUid(), array('title' => $media_object['value'], 'description' => $media_object['description'], 'alternative' => 'DD Import'));
|
||||
$this->createFileRelations($file->getUid(), 'tx_events_domain_model_event', $this->tmpCurrentEvent->getUid(), 'images', $this->storagePid);
|
||||
$this->createFileRelations($file->getUid(), 'tx_events_domain_model_event', $this->tmpCurrentEvent->getUid(), 'images', $this->storagePid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$error = false;
|
||||
}
|
||||
|
@ -665,7 +691,8 @@ class DestinationDataImportService {
|
|||
* @param string $file
|
||||
* @return string
|
||||
*/
|
||||
protected function loadFile($file) {
|
||||
protected function loadFile($file)
|
||||
{
|
||||
$directory = $this->environment->getPublicPath() . "/uploads/tx_events/";
|
||||
$filename = basename($file);
|
||||
$this->logger->info('Getting file ' . $file . ' as ' . $filename);
|
||||
|
@ -687,7 +714,8 @@ class DestinationDataImportService {
|
|||
* @param string $storagePid
|
||||
* @return bool
|
||||
*/
|
||||
protected function createFileRelations($uid_local, $tablenames, $uid_foreign, $fieldname, $storagePid) {
|
||||
protected function createFileRelations($uid_local, $tablenames, $uid_foreign, $fieldname, $storagePid)
|
||||
{
|
||||
|
||||
$newId = 'NEW1234';
|
||||
|
||||
|
@ -706,7 +734,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();
|
||||
|
||||
|
@ -714,7 +742,7 @@ class DestinationDataImportService {
|
|||
return true;
|
||||
}
|
||||
|
||||
foreach($dataHandler->errorLog as $error) {
|
||||
foreach ($dataHandler->errorLog as $error) {
|
||||
$this->logger->info($error);
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
namespace Wrm\Events\ViewHelpers;
|
||||
|
||||
class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper {
|
||||
protected function renderHiddenReferrerFields(){
|
||||
class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper
|
||||
{
|
||||
protected function renderHiddenReferrerFields()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
return [
|
||||
'events:destinationdataimport‚' => [
|
||||
'class' => \Wrm\Events\Command\DestinationDataImportCommand::class
|
||||
],
|
||||
'events:removeAll' => [
|
||||
'class' => \Wrm\Events\Command\RemoveAllCommand::class
|
||||
],
|
||||
'events:removePast' => [
|
||||
'class' => \Wrm\Events\Command\RemovePastCommand::class
|
||||
],
|
||||
];
|
9
Configuration/Extbase/Persistence/Classes.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
\Wrm\Events\Domain\Model\Category::class => [
|
||||
'tableName' => 'sys_category',
|
||||
],
|
||||
];
|
|
@ -1,101 +0,0 @@
|
|||
#
|
||||
# Extension Builder settings for extension events
|
||||
# generated 2019-04-01T14:33:00Z
|
||||
#
|
||||
# See http://www.yaml.org/spec/1.2/spec.html
|
||||
#
|
||||
|
||||
---
|
||||
|
||||
########### Overwrite settings ###########
|
||||
#
|
||||
# These settings only apply, if the roundtrip feature of the extension builder
|
||||
# is enabled in the extension manager
|
||||
#
|
||||
# Usage:
|
||||
# nesting reflects the file structure
|
||||
# a setting applies to a file or recursive to all files and subfolders
|
||||
#
|
||||
# merge:
|
||||
# means for classes: All properties ,methods and method bodies
|
||||
# of the existing class will be modified according to the new settings
|
||||
# but not overwritten
|
||||
#
|
||||
# for locallang xlf files: Existing keys and labels are always
|
||||
# preserved (renaming a property or DomainObject will result in new keys and new labels)
|
||||
#
|
||||
# for other files: You will find a Split token at the end of the file
|
||||
# see: \EBT\ExtensionBuilder\Service\RoundTrip::SPLIT_TOKEN
|
||||
#
|
||||
# After this token you can write whatever you want and it will be appended
|
||||
# everytime the code is generated
|
||||
#
|
||||
# keep:
|
||||
# files are never overwritten
|
||||
# These settings may break the functionality of the extension builder!
|
||||
# Handle with care!
|
||||
#
|
||||
#
|
||||
|
||||
############ extension settings ##############
|
||||
|
||||
overwriteSettings:
|
||||
Classes:
|
||||
Controller: merge
|
||||
Domain:
|
||||
Model: merge
|
||||
Repository: merge
|
||||
|
||||
Configuration:
|
||||
#TCA merge not possible - use overrides directory
|
||||
#TypoScript: keep
|
||||
|
||||
Resources:
|
||||
Private:
|
||||
#Language: merge
|
||||
#Templates: keep
|
||||
|
||||
user_extension.svg: keep
|
||||
|
||||
# ext_localconf.php: merge
|
||||
|
||||
# ext_tables.php: merge
|
||||
|
||||
# ext_tables.sql: merge
|
||||
|
||||
## use static date attribute in xliff files ##
|
||||
#staticDateInXliffFiles: 2019-04-01T14:33:00Z
|
||||
|
||||
## skip docComment (license header) ##
|
||||
#skipDocComment
|
||||
|
||||
## list of error codes for warnings that should be ignored ##
|
||||
#ignoreWarnings:
|
||||
#503
|
||||
|
||||
######### settings for classBuilder #############################
|
||||
#
|
||||
# here you may define default parent classes for your classes
|
||||
# these settings only apply for new generated classes
|
||||
# you may also just change the parent class in the generated class file.
|
||||
# It will be kept on next code generation, if the overwrite settings
|
||||
# are configured to merge it
|
||||
#
|
||||
#################################################################
|
||||
|
||||
classBuilder:
|
||||
|
||||
Controller:
|
||||
parentClass: \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
|
||||
|
||||
Model:
|
||||
AbstractEntity:
|
||||
parentClass: \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
|
||||
AbstractValueObject:
|
||||
parentClass: \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
|
||||
|
||||
Repository:
|
||||
parentClass: \TYPO3\CMS\Extbase\Persistence\Repository
|
||||
|
||||
setDefaultValuesForClassProperties: true
|
|
@ -13,6 +13,7 @@
|
|||
<label>Sort By</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Start</numIndex>
|
||||
|
@ -33,6 +34,7 @@
|
|||
<label>Sort Order</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">
|
||||
|
@ -128,6 +130,7 @@
|
|||
<label>Layout option</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Default</numIndex>
|
||||
|
@ -164,11 +167,12 @@
|
|||
<label>Region</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<foreign_table>tx_events_domain_model_region</foreign_table>
|
||||
<foreign_table_where>AND tx_events_domain_model_region.deleted = 0 AND tx_events_domain_model_region.hidden = 0</foreign_table_where>
|
||||
<size>3</size>
|
||||
<size>1</size>
|
||||
<minitems>0</minitems>
|
||||
<maxitems>2</maxitems>
|
||||
<maxitems>1</maxitems>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.region>
|
||||
|
@ -179,6 +183,7 @@
|
|||
<label>Combination</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">And</numIndex>
|
||||
|
@ -202,6 +207,7 @@
|
|||
</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectTree</renderType>
|
||||
<autoSizeMax>20</autoSizeMax>
|
||||
<foreign_table>sys_category</foreign_table>
|
||||
<foreign_table_where> AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC</foreign_table_where>
|
||||
|
@ -233,4 +239,4 @@
|
|||
</ROOT>
|
||||
</sConstrains>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
||||
</T3DataStructure>
|
||||
|
|
|
@ -1,402 +0,0 @@
|
|||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Options</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<switchableControllerActions>
|
||||
<TCEforms>
|
||||
<label>Controller action</label>
|
||||
<onChange>reload</onChange>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<items>
|
||||
<numIndex index="0">
|
||||
<numIndex index="0">Event List</numIndex>
|
||||
<numIndex index="1">Event->list</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1">
|
||||
<numIndex index="0">Event Teaser</numIndex>
|
||||
<numIndex index="1">Event->teaser</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="2">
|
||||
<numIndex index="0">Event Show</numIndex>
|
||||
<numIndex index="1">Event->show</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="3">
|
||||
<numIndex index="0">Date List</numIndex>
|
||||
<numIndex index="1">Date->list</numIndex>
|
||||
</numIndex>
|
||||
<!--
|
||||
<numIndex index="4">
|
||||
<numIndex index="0">Date Teaser</numIndex>
|
||||
<numIndex index="1">Date->teaser</numIndex>
|
||||
</numIndex>
|
||||
-->
|
||||
<numIndex index="5">
|
||||
<numIndex index="0">Date Show</numIndex>
|
||||
<numIndex index="1">Date->show</numIndex>
|
||||
</numIndex>
|
||||
|
||||
<numIndex index="6">
|
||||
<numIndex index="0">Event Search</numIndex>
|
||||
<numIndex index="1">Event->search</numIndex>
|
||||
</numIndex>
|
||||
|
||||
<numIndex index="6">
|
||||
<numIndex index="0">Date Search</numIndex>
|
||||
<numIndex index="1">Date->search</numIndex>
|
||||
</numIndex>
|
||||
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</switchableControllerActions>
|
||||
|
||||
<settings.sortByEvent>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Sort By</label>
|
||||
<displayCond>FIELD:switchableControllerActions:=:Event->list</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Title</numIndex>
|
||||
<numIndex index="1">title</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">Region</numIndex>
|
||||
<numIndex index="1">region</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.sortByEvent>
|
||||
|
||||
<settings.sortByDate>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Sort By</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->search</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Start</numIndex>
|
||||
<numIndex index="1">start</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">End</numIndex>
|
||||
<numIndex index="1">end</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.sortByDate>
|
||||
|
||||
<settings.sortOrder>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Sort Order</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
<numIndex index="2">FIELD:switchableControllerActions:=:Date->search</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">
|
||||
Ascending
|
||||
</numIndex>
|
||||
<numIndex index="1">ASC</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">
|
||||
Descending
|
||||
</numIndex>
|
||||
<numIndex index="1">DESC</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
<default>ASC</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.sortOrder>
|
||||
|
||||
<settings.limit>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Max Items</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
<numIndex index="2">FIELD:switchableControllerActions:=:Date->search</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>10</size>
|
||||
<max>30</max>
|
||||
<eval>trim</eval>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.limit>
|
||||
|
||||
<settings.highlight>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Highlights only</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.highlight>
|
||||
|
||||
<settings.todayOnly>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Today only</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.todayOnly>
|
||||
|
||||
<settings.pagination>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Show pagination</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.pagination>
|
||||
|
||||
<settings.showPID>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Detail page</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Event->teaser</numIndex>
|
||||
<numIndex index="2">FIELD:switchableControllerActions:=:Event->search</numIndex>
|
||||
<numIndex index="3">FIELD:switchableControllerActions:=:Date->list</numIndex>
|
||||
<numIndex index="4">FIELD:switchableControllerActions:=:Date->teaser</numIndex>
|
||||
<numIndex index="5">FIELD:switchableControllerActions:=:Date->search</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.showPID>
|
||||
|
||||
<settings.eventUids>
|
||||
<TCEforms>
|
||||
<label>
|
||||
Event
|
||||
</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:switchableControllerActions:=:Event->teaser</numIndex>
|
||||
<numIndex index="1">FIELD:switchableControllerActions:=:Date->teaser</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<foreign_table>tx_events_domain_model_event</foreign_table>
|
||||
<foreign_table_where>AND tx_events_domain_model_event.deleted = 0 AND tx_events_domain_model_event.hidden = 0</foreign_table_where>
|
||||
<size>3</size>
|
||||
<enableMultiSelectFilterTextfield>1</enableMultiSelectFilterTextfield>
|
||||
<minitems>0</minitems>
|
||||
<maxitems>99</maxitems>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.eventUids>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
<sTemplate>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Template</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.template>
|
||||
<exclude>1</exclude>
|
||||
<label>Layout option</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:sDEF.switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:sDEF.switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Default</numIndex>
|
||||
<numIndex index="1">default</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">Costum</numIndex>
|
||||
<numIndex index="1">costum</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="2" type="array">
|
||||
<numIndex index="0">Table</numIndex>
|
||||
<numIndex index="1">table</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="3" type="array">
|
||||
<numIndex index="0">Grid</numIndex>
|
||||
<numIndex index="1">grid</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
<default>default</default>
|
||||
</config>
|
||||
</settings.template>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sTemplate>
|
||||
<sConstrains>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Regions & Categories</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.region>
|
||||
<TCEforms>
|
||||
<label>Region</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:sDEF.switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:sDEF.switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<foreign_table>tx_events_domain_model_region</foreign_table>
|
||||
<foreign_table_where>AND tx_events_domain_model_region.deleted = 0 AND tx_events_domain_model_region.hidden = 0</foreign_table_where>
|
||||
<size>3</size>
|
||||
<minitems>0</minitems>
|
||||
<maxitems>2</maxitems>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.region>
|
||||
|
||||
<settings.categoryCombination>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Combination</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:sDEF.switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:sDEF.switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">And</numIndex>
|
||||
<numIndex index="1">0</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">Or</numIndex>
|
||||
<numIndex index="1">1</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.categoryCombination>
|
||||
|
||||
<settings.categories>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>
|
||||
Category
|
||||
</label>
|
||||
<displayCond>
|
||||
<OR>
|
||||
<numIndex index="0">FIELD:sDEF.switchableControllerActions:=:Event->list</numIndex>
|
||||
<numIndex index="1">FIELD:sDEF.switchableControllerActions:=:Date->list</numIndex>
|
||||
</OR>
|
||||
</displayCond>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<autoSizeMax>20</autoSizeMax>
|
||||
<foreign_table>sys_category</foreign_table>
|
||||
<foreign_table_where> AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC</foreign_table_where>
|
||||
<maxitems>1</maxitems>
|
||||
<renderMode>tree</renderMode>
|
||||
<size>8</size>
|
||||
<treeConfig>
|
||||
<appearance>
|
||||
<expandAll>1</expandAll>
|
||||
<showHeader>1</showHeader>
|
||||
</appearance>
|
||||
<parentField>parent</parentField>
|
||||
</treeConfig>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.categories>
|
||||
|
||||
<settings.includeSubcategories>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Include Subcategories</label>
|
||||
<displayCond>FIELD:sDEF.switchableControllerActions:=:Event->list</displayCond>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.includeSubcategories>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sConstrains>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
24
Configuration/FlexForms/Selected.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.selectedRecords>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>LLL:EXT:events/Resources/Private/Language/de.locallang_db.xlf:tx_events.flexform.selected.selectedRecords</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>tx_events_domain_model_event</allowed>
|
||||
<minitems>1</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.selectedRecords>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
34
Configuration/Services.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
|
||||
Wrm\Events\:
|
||||
resource: '../Classes/*'
|
||||
|
||||
Wrm\Events\Command\DestinationDataImportCommand:
|
||||
tags:
|
||||
- name: 'console.command'
|
||||
command: 'events:destinationdataimport'
|
||||
events.levacy_comannd_identifier:
|
||||
class: 'Wrm\Events\Command\DestinationDataImportCommand'
|
||||
tags:
|
||||
- name: 'console.command'
|
||||
command: 'events:destinationdataimport‚'
|
||||
|
||||
Wrm\Events\Command\RemoveAllCommand:
|
||||
tags:
|
||||
- name: 'console.command'
|
||||
command: 'events:removeAll'
|
||||
|
||||
Wrm\Events\Command\RemovePastCommand:
|
||||
tags:
|
||||
- name: 'console.command'
|
||||
command: 'events:removePast'
|
||||
|
||||
Wrm\Events\Extbase\AddSpecialProperties:
|
||||
tags:
|
||||
- name: event.listener
|
||||
identifier: 'WrmEventsAddSpecialPropertiesToDate'
|
||||
event: TYPO3\CMS\Extbase\Event\Persistence\AfterObjectThawedEvent
|
16
Configuration/TCA/Overrides/sys_category.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
defined('TYPO3') or die();
|
||||
|
||||
(function (string $extKey, string $table) {
|
||||
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$table], [
|
||||
'columns' => [
|
||||
'sorting' => [
|
||||
'config' => [
|
||||
// Allow extbase to map this column to model
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
})('events', 'sys_category');
|
|
@ -1,32 +1,16 @@
|
|||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
defined('TYPO3') or die();
|
||||
|
||||
call_user_func(function () {
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Pi1',
|
||||
'Events Plugin',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
);
|
||||
|
||||
$pluginSignature = 'events_pi1';
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
$pluginSignature,
|
||||
'FILE:EXT:events/Configuration/FlexForms/Pi1.xml'
|
||||
);
|
||||
|
||||
/* Search Plugin */
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Events',
|
||||
'DateSearch',
|
||||
'Events: Date Search',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
'EXT:events/Resources/Public/Icons/Extension.svg'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_datesearch'] = 'pi_flexform';
|
||||
|
@ -39,10 +23,10 @@ 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'
|
||||
'EXT:events/Resources/Public/Icons/Extension.svg'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_datelist'] = 'pi_flexform';
|
||||
|
@ -55,10 +39,10 @@ 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'
|
||||
'EXT:events/Resources/Public/Icons/Extension.svg'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_dateshow'] = 'pi_flexform';
|
||||
|
@ -69,4 +53,20 @@ call_user_func(function () {
|
|||
);
|
||||
|
||||
|
||||
/* Event Selected Plugin */
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Events',
|
||||
'Selected',
|
||||
'Events: Show selected',
|
||||
'EXT:events/Resources/Public/Icons/Extension.svg'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_selected'] = 'pi_flexform';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
'events_selected',
|
||||
'FILE:EXT:events/Configuration/FlexForms/Selected.xml'
|
||||
);
|
||||
|
||||
});
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
defined('TYPO3') or die();
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
|
||||
'dd_events',
|
||||
'events',
|
||||
'tx_events_domain_model_event',
|
||||
'categories',
|
||||
[
|
||||
'label' => 'Categories',
|
||||
'fieldConfiguration' => [
|
||||
'minitems' => 0,
|
||||
'maxitems' => 3,
|
||||
'multiple' => true,
|
||||
]
|
||||
]
|
||||
);
|
||||
);
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date',
|
||||
'label' => 'start',
|
||||
'label_alt' => 'end, canceled',
|
||||
'label_alt_force' => true,
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
|
@ -17,13 +20,10 @@ return [
|
|||
'endtime' => 'endtime',
|
||||
],
|
||||
'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',
|
||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_date.svg'
|
||||
],
|
||||
'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'],
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, start, end, canceled, postponed_date, canceled_link, event, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
|
@ -45,7 +45,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',
|
||||
|
@ -140,6 +139,66 @@ return [
|
|||
'default' => null,
|
||||
],
|
||||
],
|
||||
'canceled' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 'no',
|
||||
'items' => [
|
||||
'0' => [
|
||||
'0' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled.options.no',
|
||||
'1' => 'no',
|
||||
],
|
||||
'1' => [
|
||||
'0' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled.options.canceled',
|
||||
'1' => 'canceled',
|
||||
],
|
||||
'2' => [
|
||||
'0' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled.options.postponed',
|
||||
'1' => 'postponed',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'postponed_date' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.postponed_date',
|
||||
'displayCond' => 'FIELD:canceled:=:postponed',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_events_domain_model_date',
|
||||
'foreign_table_where' => ' AND {#tx_events_domain_model_date}.{#event} = ###REC_FIELD_event### AND {#tx_events_domain_model_date}.{#uid} != ###THIS_UID###',
|
||||
'default' => '0',
|
||||
'items' => [
|
||||
'0' => [
|
||||
'0' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.postponed_date.0',
|
||||
'1' => '0',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'canceled_link' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled_link',
|
||||
'displayCond' => 'FIELD:canceled:=:canceled',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'softref' => 'typolink',
|
||||
'renderType' => 'inputLink',
|
||||
'max' => 1024,
|
||||
'eval' => 'trim',
|
||||
'fieldControl' => [
|
||||
'linkPopup' => [
|
||||
'options' => [
|
||||
'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'event' => array(
|
||||
'exclude' => 1,
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
$l10nPathGeneral = 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf';
|
||||
$l10nPathLang = 'LLL:EXT:lang/locallang_core.xlf';
|
||||
$l10nPathFE = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf';
|
||||
$l10nPath = 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf';
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event',
|
||||
'title' => $l10nPath . ':tx_events_domain_model_event',
|
||||
'label' => 'title',
|
||||
'thumbnail' => 'images',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
|
@ -16,26 +25,69 @@ return [
|
|||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'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',
|
||||
'searchFields' => 'title,subtitle,global_id,teaser',
|
||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_event.svg'
|
||||
],
|
||||
'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'],
|
||||
'1' => [
|
||||
'showitem' => '--palette--;' . $l10nPathFE . ':palette.general;general,
|
||||
sys_language_uid,
|
||||
l10n_parent,
|
||||
l10n_diffsource,
|
||||
hidden,
|
||||
highlight,
|
||||
title,
|
||||
subtitle,
|
||||
teaser,
|
||||
slug,
|
||||
ticket,
|
||||
global_id,
|
||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.text,
|
||||
details,
|
||||
price_info,
|
||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.dates,
|
||||
dates,
|
||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.location,
|
||||
name,
|
||||
street,
|
||||
district,
|
||||
city,
|
||||
zip,
|
||||
country,
|
||||
phone,
|
||||
web,
|
||||
latitude,
|
||||
longitude,
|
||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.relations,
|
||||
organizer,
|
||||
region,
|
||||
partner,
|
||||
categories,
|
||||
references_events,
|
||||
pages,
|
||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.media,
|
||||
images,
|
||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.social,
|
||||
facebook,
|
||||
youtube,
|
||||
instagram,
|
||||
--div--;' . $l10nPathFE . ':tabs.access,
|
||||
starttime,
|
||||
endtime'
|
||||
],
|
||||
],
|
||||
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'label' => $l10nPathGeneral . ':LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'special' => 'languages',
|
||||
'items' => [
|
||||
[
|
||||
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
|
||||
$l10nPathGeneral . ':LGL.allLanguages',
|
||||
-1,
|
||||
'flags-multiple'
|
||||
]
|
||||
|
@ -45,8 +97,7 @@ return [
|
|||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'label' => $l10nPathGeneral . ':LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
|
@ -64,7 +115,7 @@ return [
|
|||
],
|
||||
],
|
||||
't3ver_label' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||
'label' => $l10nPathGeneral . ':LGL.versionLabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -73,7 +124,7 @@ return [
|
|||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'label' => $l10nPathGeneral . ':LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
|
@ -88,7 +139,7 @@ return [
|
|||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'label' => $l10nPathGeneral . ':LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
|
@ -101,7 +152,7 @@ return [
|
|||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'label' => $l10nPathGeneral . ':LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
|
@ -118,16 +169,27 @@ return [
|
|||
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.title',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 2,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'subtitle' => [
|
||||
'exclude' => true,
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.subtitle',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 2,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'global_id' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.global_id',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.global_id',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -136,7 +198,7 @@ return [
|
|||
],
|
||||
'slug' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.slug',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.slug',
|
||||
'config' => [
|
||||
'type' => 'slug',
|
||||
'size' => 50,
|
||||
|
@ -152,12 +214,12 @@ return [
|
|||
],
|
||||
'highlight' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.highlight',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.highlight',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'items' => [
|
||||
'1' => [
|
||||
'0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
|
||||
'0' => $l10nPathLang . ':labels.enabled'
|
||||
]
|
||||
],
|
||||
'default' => 0,
|
||||
|
@ -165,21 +227,21 @@ return [
|
|||
],
|
||||
'teaser' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.teaser',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.teaser',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'cols' => 30,
|
||||
'rows' => 5,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'details' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.details',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.details',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'enableRichtext' => true,
|
||||
'richtextConfiguration' => 'default',
|
||||
'richtextConfiguration' => 'Default',
|
||||
'fieldControl' => [
|
||||
'fullScreenRichtext' => [
|
||||
'disabled' => false,
|
||||
|
@ -189,11 +251,11 @@ return [
|
|||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
'price_info' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.price_info',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.price_info',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
|
@ -203,7 +265,7 @@ return [
|
|||
],
|
||||
'name' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.name',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.name',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -212,7 +274,7 @@ return [
|
|||
],
|
||||
'street' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.street',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.street',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -221,7 +283,7 @@ return [
|
|||
],
|
||||
'district' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.district',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.district',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -230,7 +292,7 @@ return [
|
|||
],
|
||||
'city' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.city',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.city',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -239,7 +301,7 @@ return [
|
|||
],
|
||||
'zip' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.zip',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.zip',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -248,7 +310,7 @@ return [
|
|||
],
|
||||
'country' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.country',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.country',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -257,7 +319,7 @@ return [
|
|||
],
|
||||
'phone' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.phone',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.phone',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -266,7 +328,7 @@ return [
|
|||
],
|
||||
'web' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.web',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.web',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -275,16 +337,19 @@ return [
|
|||
],
|
||||
'ticket' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.ticket',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.ticket',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
'renderType' => 'inputLink',
|
||||
'eval' => 'trim',
|
||||
'max' => 1024,
|
||||
'size' => 50,
|
||||
'softref' => 'typolink',
|
||||
],
|
||||
],
|
||||
'facebook' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.facebook',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.facebook',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -293,7 +358,7 @@ return [
|
|||
],
|
||||
'youtube' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.youtube',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.youtube',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -302,7 +367,7 @@ return [
|
|||
],
|
||||
'instagram' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.instagram',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.instagram',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -311,7 +376,7 @@ return [
|
|||
],
|
||||
'latitude' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.latitude',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.latitude',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -320,7 +385,7 @@ return [
|
|||
],
|
||||
'longitude' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.longitude',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.longitude',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
|
@ -329,12 +394,12 @@ return [
|
|||
],
|
||||
'images' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.images',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.images',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'images',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
|
||||
'createNewRelationLinkTitle' => $l10nPathFE . ':images.addFileReference',
|
||||
'showPossibleLocalizationRecords' => true,
|
||||
'showRemovedLocalizationRecords' => true,
|
||||
'showAllLocalizationLink' => true,
|
||||
|
@ -348,44 +413,54 @@ return [
|
|||
'foreign_types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;' . $l10nPathFE . ':sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;' . $l10nPathFE . ':sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;' . $l10nPathFE . ':sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;' . $l10nPathFE . ':sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;' . $l10nPathFE . ':sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;' . $l10nPathFE . ':sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
]
|
||||
],
|
||||
'maxitems' => 1
|
||||
'maxitems' => 8
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
|
||||
'pages' => [
|
||||
'exclude' => true,
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.pages',
|
||||
'config' => [
|
||||
'type' => 'group',
|
||||
'internal_type' => 'db',
|
||||
'allowed' => 'pages',
|
||||
],
|
||||
],
|
||||
|
||||
'categories' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.categories',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.categories',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 4,
|
||||
|
@ -395,7 +470,7 @@ return [
|
|||
|
||||
'dates' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.dates',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.dates',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_events_domain_model_date',
|
||||
|
@ -411,7 +486,7 @@ return [
|
|||
'dragdrop' => false,
|
||||
'sort' => false,
|
||||
'hide' => false,
|
||||
'delete' => false,
|
||||
'delete' => true,
|
||||
'localize' => false,
|
||||
),
|
||||
'levelLinksPosition' => 'top',
|
||||
|
@ -427,26 +502,59 @@ return [
|
|||
|
||||
'organizer' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.organizer',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.organizer',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_events_domain_model_organizer',
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'region' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.region',
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.region',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_events_domain_model_region',
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
'references_events' => [
|
||||
'exclude' => true,
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.references_events',
|
||||
'config' => [
|
||||
'type' => 'group',
|
||||
'internal_type' => 'db',
|
||||
'allowed' => 'tx_events_domain_model_event',
|
||||
'suggestOptions' => [
|
||||
'tx_events_domain_model_event' => [
|
||||
'searchCondition' => 'tx_events_domain_model_event.sys_language_uid IN (0, -1)',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'partner' => [
|
||||
'exclude' => true,
|
||||
'label' => $l10nPath . ':tx_events_domain_model_event.partner',
|
||||
'config' => [
|
||||
'type' => 'group',
|
||||
'internal_type' => 'db',
|
||||
'allowed' => 'tx_events_domain_model_partner',
|
||||
'fieldControl' => [
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
'pid' => '###CURRENT_PID###',
|
||||
'table' => 'tx_events_domain_model_partner',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -17,10 +17,7 @@ return [
|
|||
'endtime' => 'endtime',
|
||||
],
|
||||
'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',
|
||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_organizer.svg'
|
||||
],
|
||||
'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',
|
||||
|
@ -188,6 +184,6 @@ return [
|
|||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
];
|
||||
|
|
133
Configuration/TCA/tx_events_domain_model_partner.php
Normal file
|
@ -0,0 +1,133 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_partner.xlf:tx_events_domain_model_partner',
|
||||
'label' => 'title',
|
||||
'thumbnail' => 'images',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
],
|
||||
'searchFields' => 'title',
|
||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_partner.svg'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, link, images, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'special' => 'languages',
|
||||
'items' => [
|
||||
[
|
||||
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
|
||||
-1,
|
||||
'flags-multiple'
|
||||
]
|
||||
],
|
||||
'default' => 0,
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_events_domain_model_partner',
|
||||
'foreign_table_where' => 'AND {#tx_events_domain_model_partner}.{#pid}=###CURRENT_PID### AND {#tx_events_domain_model_partner}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
't3ver_label' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'max' => 255,
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_partner.xlf:tx_events_domain_model_partner.title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'link' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_partner.xlf:tx_events_domain_model_partner.link',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputLink',
|
||||
'eval' => 'trim',
|
||||
'max' => 1024,
|
||||
'size' => 50,
|
||||
'softref' => 'typolink',
|
||||
],
|
||||
],
|
||||
'images' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_partner.xlf:tx_events_domain_model_partner.images',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('images', [
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
// custom configuration for displaying fields in the overlay/reference table
|
||||
// to use the imageoverlayPalette instead of the basicoverlayPalette
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
],
|
||||
],
|
||||
], $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])
|
||||
],
|
||||
],
|
||||
];
|
|
@ -17,10 +17,7 @@ return [
|
|||
'endtime' => 'endtime',
|
||||
],
|
||||
'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',
|
||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_region.svg'
|
||||
],
|
||||
'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',
|
||||
|
@ -125,6 +121,6 @@ return [
|
|||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
];
|
||||
|
|
|
@ -56,6 +56,21 @@ plugin.tx_events {
|
|||
categoriesPid = {$plugin.tx_events.settings.destinationData.categoriesPid}
|
||||
categoryParentUid = {$plugin.tx_events.settings.destinationData.categoryParentUid}
|
||||
}
|
||||
dataProcessing {
|
||||
Wrm\Events\Domain\Model\Event {
|
||||
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
10 {
|
||||
special = list
|
||||
special.value.field = pages
|
||||
dataProcessing {
|
||||
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
|
||||
10 {
|
||||
references.fieldName = media
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,24 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
<target>Termin</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
<target>Beginn</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
<target>Ende</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.event">
|
||||
<source>Associated event</source>
|
||||
<target>Verknüpfte Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
<target>Termin</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
<target>Beginn</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
<target>Ende</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled">
|
||||
<source>Canceled or postponed?</source>
|
||||
<target>Abgesagt oder verschoben?</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.no">
|
||||
<source>No</source>
|
||||
<target>Nein</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.canceled">
|
||||
<source>Canceled</source>
|
||||
<target>Abgesagt</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.postponed">
|
||||
<source>Postponed</source>
|
||||
<target>Verschoben</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.postponed_date">
|
||||
<source>Postponed date</source>
|
||||
<target>Verschoben auf folgendes Datum</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.postponed_date.0">
|
||||
<source>Not defined</source>
|
||||
<target>Noch nicht definiert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.options.canceled_link">
|
||||
<source>Link regarding cancellation</source>
|
||||
<target>Link bezüglich Absage</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.event">
|
||||
<source>Associated event</source>
|
||||
<target>Verknüpfte Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -1,128 +1,168 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
<target>Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
<target>Veranstaltungs Modul</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event">
|
||||
<source>Event</source>
|
||||
<target>Veranstaltung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.global_id">
|
||||
<source>Global UID</source>
|
||||
<target>Globale UID</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.slug">
|
||||
<source>Slug</source>
|
||||
<target>URL-Segment</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.highlight">
|
||||
<source>Highlight</source>
|
||||
<target>Höhepunkt</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.teaser">
|
||||
<source>Teaser</source>
|
||||
<target>Kurztext</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.details">
|
||||
<source>Details</source>
|
||||
<target>Text</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.price_info">
|
||||
<source>Price Info</source>
|
||||
<target>Preis Information</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.name">
|
||||
<source>Name</source>
|
||||
<target>Name</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.street">
|
||||
<source>Street</source>
|
||||
<target>Straße</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.district">
|
||||
<source>District</source>
|
||||
<target>Bundesland</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.city">
|
||||
<source>City</source>
|
||||
<target>Stadt</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.zip">
|
||||
<source>Zip</source>
|
||||
<target>Postleitzahl</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.country">
|
||||
<source>Country</source>
|
||||
<target>Land</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.web">
|
||||
<source>Web</source>
|
||||
<target>Internet</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.phone">
|
||||
<source>Phone</source>
|
||||
<target>Telefon</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.ticket">
|
||||
<source>Ticket</source>
|
||||
<target>Ticket</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.facebook">
|
||||
<source>Facebook</source>
|
||||
<target>Facebook</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.youtube">
|
||||
<source>YouTube</source>
|
||||
<target>YouTube</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.instagram">
|
||||
<source>Instagram</source>
|
||||
<target>Instagram</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.latitude">
|
||||
<source>Latitude</source>
|
||||
<target>Breitengrad</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.longitude">
|
||||
<source>Longitude</source>
|
||||
<target>Längengrad</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.images">
|
||||
<source>Images</source>
|
||||
<target>Bilder</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.categories">
|
||||
<source>Categories</source>
|
||||
<target>Kategorien</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.dates">
|
||||
<source>Dates</source>
|
||||
<target>Termine</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.organizer">
|
||||
<source>Organizer</source>
|
||||
<target>Organisator</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.region">
|
||||
<source>Region</source>
|
||||
<target>Region</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_organizer">
|
||||
<source>Organizer</source>
|
||||
<target>Organisator</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
<target>Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
<target>Veranstaltungs Modul</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.text">
|
||||
<source>Text</source>
|
||||
<target>Texte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.dates">
|
||||
<source>Dates</source>
|
||||
<target>Termine</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.location">
|
||||
<source>Location</source>
|
||||
<target>Veranstaltungsort</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.relations">
|
||||
<source>Relations</source>
|
||||
<target>Relationen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.media">
|
||||
<source>Media</source>
|
||||
<target>Medien</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.social">
|
||||
<source>Social Media</source>
|
||||
<target>Social Media</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event">
|
||||
<source>Event</source>
|
||||
<target>Veranstaltung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.subtitle">
|
||||
<source>Subtitle</source>
|
||||
<target>Untertitel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.global_id">
|
||||
<source>Global UID</source>
|
||||
<target>Globale UID</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.slug">
|
||||
<source>Slug</source>
|
||||
<target>URL-Segment</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.highlight">
|
||||
<source>Highlight</source>
|
||||
<target>Höhepunkt</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.teaser">
|
||||
<source>Teaser</source>
|
||||
<target>Kurztext</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.details">
|
||||
<source>Details</source>
|
||||
<target>Text</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.price_info">
|
||||
<source>Price Info</source>
|
||||
<target>Preis Information</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.name">
|
||||
<source>Name</source>
|
||||
<target>Name</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.street">
|
||||
<source>Street</source>
|
||||
<target>Straße</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.district">
|
||||
<source>District</source>
|
||||
<target>Bundesland</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.city">
|
||||
<source>City</source>
|
||||
<target>Stadt</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.zip">
|
||||
<source>Zip</source>
|
||||
<target>Postleitzahl</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.country">
|
||||
<source>Country</source>
|
||||
<target>Land</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.web">
|
||||
<source>Web</source>
|
||||
<target>Internet</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.phone">
|
||||
<source>Phone</source>
|
||||
<target>Telefon</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.ticket">
|
||||
<source>Ticket</source>
|
||||
<target>Ticket</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.facebook">
|
||||
<source>Facebook</source>
|
||||
<target>Facebook</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.youtube">
|
||||
<source>YouTube</source>
|
||||
<target>YouTube</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.instagram">
|
||||
<source>Instagram</source>
|
||||
<target>Instagram</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.latitude">
|
||||
<source>Latitude</source>
|
||||
<target>Breitengrad</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.longitude">
|
||||
<source>Longitude</source>
|
||||
<target>Längengrad</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.images">
|
||||
<source>Images</source>
|
||||
<target>Bilder</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.pages">
|
||||
<source>Pages</source>
|
||||
<target>Seiten</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.categories">
|
||||
<source>Categories</source>
|
||||
<target>Kategorien</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.dates">
|
||||
<source>Dates</source>
|
||||
<target>Termine</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.organizer">
|
||||
<source>Organizer</source>
|
||||
<target>Organisator</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.region">
|
||||
<source>Region</source>
|
||||
<target>Region</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_organizer">
|
||||
<source>Organizer</source>
|
||||
<target>Organisator</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.partner">
|
||||
<source>Partner</source>
|
||||
<target>Partner</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.references_events">
|
||||
<source>Related Events</source>
|
||||
<target>Ähnliche Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
24
Resources/Private/Language/de.locallang_csh_partner.xlf
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_partner">
|
||||
<source>Partner</source>
|
||||
<target>Partner</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_partner.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_partner.link">
|
||||
<source>Link</source>
|
||||
<target>Link</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_partner.images">
|
||||
<source>Images</source>
|
||||
<target>Bilder</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -1,16 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
<target>Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
<target>Veranstaltungs Modul</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
<target>Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
<target>Veranstaltungs Modul</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.flexform.selected.selectedRecords">
|
||||
<source>Records to show</source>
|
||||
<target>Anzuzeigende Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -1,20 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.event">
|
||||
<source>Associated event</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled">
|
||||
<source>Canceled or postponed?</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.no">
|
||||
<source>No</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.canceled">
|
||||
<source>Canceled</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.postponed">
|
||||
<source>Postponed</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.postponed_date">
|
||||
<source>Postponed date</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled.options.postponed_date.0">
|
||||
<source>Not defined</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.canceled_link">
|
||||
<source>Link regarding cancellation</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.event">
|
||||
<source>Associated event</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -1,95 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event">
|
||||
<source>Event</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.global_id">
|
||||
<source>Global UID</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.slug">
|
||||
<source>Slug</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.highlight">
|
||||
<source>Highlight</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.teaser">
|
||||
<source>Teaser</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.details">
|
||||
<source>Details</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.price_info">
|
||||
<source>Price Info</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.name">
|
||||
<source>Name</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.street">
|
||||
<source>Street</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.district">
|
||||
<source>District</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.city">
|
||||
<source>City</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.zip">
|
||||
<source>Zip</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.country">
|
||||
<source>Country</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.web">
|
||||
<source>Web</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.phone">
|
||||
<source>Phone</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.ticket">
|
||||
<source>Ticket</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.facebook">
|
||||
<source>Facebook</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.youtube">
|
||||
<source>Youtube</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.instagram">
|
||||
<source>Instagram</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.latitude">
|
||||
<source>Latitude</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.longitude">
|
||||
<source>Longitude</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.images">
|
||||
<source>Images</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.categories">
|
||||
<source>Categories</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.dates">
|
||||
<source>Dates</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.organizer">
|
||||
<source>Organizer</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.region">
|
||||
<source>Region</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event">
|
||||
<source>Event</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.text">
|
||||
<source>Text</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.dates">
|
||||
<source>Dates</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.location">
|
||||
<source>Location</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.relations">
|
||||
<source>Relations</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.media">
|
||||
<source>Media</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.tabs.social">
|
||||
<source>Social Media</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.subtitle">
|
||||
<source>Subtitle</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.global_id">
|
||||
<source>Global UID</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.slug">
|
||||
<source>Slug</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.highlight">
|
||||
<source>Highlight</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.teaser">
|
||||
<source>Teaser</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.details">
|
||||
<source>Details</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.price_info">
|
||||
<source>Price Info</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.name">
|
||||
<source>Name</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.street">
|
||||
<source>Street</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.district">
|
||||
<source>District</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.city">
|
||||
<source>City</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.zip">
|
||||
<source>Zip</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.country">
|
||||
<source>Country</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.web">
|
||||
<source>Web</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.phone">
|
||||
<source>Phone</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.ticket">
|
||||
<source>Ticket</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.facebook">
|
||||
<source>Facebook</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.youtube">
|
||||
<source>Youtube</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.instagram">
|
||||
<source>Instagram</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.latitude">
|
||||
<source>Latitude</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.longitude">
|
||||
<source>Longitude</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.images">
|
||||
<source>Images</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.pages">
|
||||
<source>Pages</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.categories">
|
||||
<source>Categories</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.dates">
|
||||
<source>Dates</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.organizer">
|
||||
<source>Organizer</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.region">
|
||||
<source>Region</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.partner">
|
||||
<source>Partner</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.references_events">
|
||||
<source>Related Events</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
20
Resources/Private/Language/locallang_csh_partner.xlf
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_partner">
|
||||
<source>Partner</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_partner.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_partner.link">
|
||||
<source>Link</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_partner.images">
|
||||
<source>Images</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -1,14 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events.name">
|
||||
<source>Events</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.description">
|
||||
<source>Event Modul</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events.flexform.selected.selectedRecords">
|
||||
<source>Records to show</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<f:for each="{dates}" as="date">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||
<div class="menu-tile">
|
||||
<f:if condition="{date.event.images}">
|
||||
<f:if condition="{date.event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
|
||||
<f:image src="{date.event.images.originalResource.originalFile.uid}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{date.event.images.0}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
|
||||
<f:widget.paginate objects="{dates}" as="paginatedDates" configuration="{itemsPerPage: 25, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 5, addQueryStringMethod: 'POST,GET'}">
|
||||
<f:widget.paginate objects="{dates}" as="paginatedDates" configuration="{itemsPerPage: 25, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 5, addQueryStringMethod: 'GET'}">
|
||||
<f:for each="{paginatedDates}" as="date" iteration="index">
|
||||
<div class="row mt-3 mb-3 pb-3">
|
||||
<div class="col-2">
|
||||
|
@ -30,10 +30,10 @@
|
|||
<f:format.crop maxCharacters="150">{date.event.details}</f:format.crop>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<f:if condition="{date.event.images}">
|
||||
<f:if condition="{date.event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
|
||||
<f:image src="{date.event.images.originalResource.originalFile.uid}" alt="" width="400c" height="280c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{date.event.images.0}" alt="" width="400c" height="280c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<f:section name="content">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<f:if condition="{date.event.images}">
|
||||
<f:if condition="{date.event.images.0}">
|
||||
<f:then>
|
||||
<f:image src="{date.event.images.originalResource.originalFile.uid}" alt="" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{date.event.images.0}" alt="" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<img src="{settings.defaultImagePath}" alt="Dummy" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
|
@ -21,8 +21,6 @@
|
|||
<h2>{date.event.title}</h2>
|
||||
<h3>{date.event.teaser}</h3>
|
||||
<f:format.html>{date.event.details}</f:format.html>
|
||||
<p>{event.price_info}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -51,6 +49,7 @@
|
|||
</div>
|
||||
<div class="col-4">
|
||||
<p><b>Veranstaltungsort:</b><br>
|
||||
{date.event.name}<br>
|
||||
{date.event.street}<br>
|
||||
{date.event.zip} {date.event.city}<br>
|
||||
{date.event.phone}<br>
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
-->
|
||||
</f:comment>
|
||||
<div class="menu-tile">
|
||||
<f:if condition="{date.event.images}">
|
||||
<f:if condition="{date.event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
|
||||
<f:image src="{date.event.images.originalResource.originalFile.uid}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{date.event.images.0}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
@ -39,4 +39,4 @@
|
|||
</f:for>
|
||||
</div>
|
||||
</f:section>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<f:for each="{events}" as="event">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||
<div class="menu-tile">
|
||||
<f:if condition="{event.images}">
|
||||
<f:if condition="{event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
|
||||
<f:image src="{event.images.originalResource.originalFile.uid}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{event.images.0}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
@ -30,4 +30,4 @@
|
|||
</f:for>
|
||||
</div>
|
||||
</f:section>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<f:for each="{events}" as="event">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||
<div class="menu-tile">
|
||||
<f:if condition="{event.images}">
|
||||
<f:if condition="{event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
|
||||
<f:image src="{event.images.originalResource.originalFile.uid}" alt="" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{event.images.0}" alt="" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
@ -26,4 +26,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<f:section name="content">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<f:if condition="{event.images}">
|
||||
<f:if condition="{event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
|
||||
<f:image src="{event.images.originalResource.originalFile.uid}" alt="" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{event.images.0}" alt="" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
@ -34,4 +34,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</f:section>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<f:for each="{events}" as="event">
|
||||
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||
<div class="menu-tile">
|
||||
<f:if condition="{event.images}">
|
||||
<f:if condition="{event.images.0}">
|
||||
<f:then>
|
||||
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
|
||||
<f:image src="{event.images.originalResource.originalFile.uid}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
<f:image image="{event.images.0}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
@ -30,4 +30,4 @@
|
|||
</f:for>
|
||||
</div>
|
||||
</f:section>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 83.1 84.17"><title>Extension</title><path d="M106.07,100.13a11.56,11.56,0,0,1-3.55.51c-10.69,0-26.39-37.36-26.39-49.79,0-4.58,1.08-6.1,2.61-7.42C65.67,45,50,49.75,44.95,55.86a12.21,12.21,0,0,0-1.74,7c0,19.41,20.72,63.45,35.33,63.45,6.76,0,18.16-11.11,27.54-26.17" transform="translate(-43.2 -42.12)" style="fill:#ff8700"/><path d="M99.25,42.12c13.52,0,27,2.18,27,9.81,0,15.48-9.82,34.25-14.83,34.25-8.94,0-20.07-24.87-20.07-37.3,0-5.67,2.18-6.76,7.85-6.76" transform="translate(-43.2 -42.12)" style="fill:#ff8700"/></svg>
|
||||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect width="16" height="16" fill="#f18519"/><polygon points="9.348 13.939 7.736 13.348 6.403 12.431 4.837 12.323 3.438 11.883 6.98 1.703 8.072 2.083 9.475 3.241 11.293 3.203 12.89 3.759 9.348 13.939" fill="#fff"/><line x1="5.56817" y1="9.89512" x2="6.60766" y2="10.25681" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.5"/><line x1="7.75059" y1="10.65449" x2="8.76597" y2="11.00779" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.5"/><path d="M8.42341,1.942,6.73947,1.3561l-3.725,10.70565,1.81686.63217A1.61336,1.61336,0,0,1,7.424,13.596l1.98114.68933,3.725-10.70565-2.01139-.69985A1.59583,1.59583,0,0,1,8.42341,1.942Z" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="0.75"/><line x1="9.76625" y1="11.35583" x2="10.66971" y2="11.67018" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.5"/><line x1="3.63513" y1="9.22253" x2="4.5725" y2="9.54869" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.5"/></svg>
|
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 230 B |
1
Resources/Public/Icons/tx_events_domain_model_date.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8,.63544A7.31924,7.31924,0,0,0,.63544,8,7.31924,7.31924,0,0,0,8,15.36456,7.31924,7.31924,0,0,0,15.36456,8,7.31924,7.31924,0,0,0,8,.63544Z" fill="#fff" stroke="#b9b9b9" stroke-miterlimit="10"/><path d="M6.94792,3.89689V8l4.31353,2.6302a2.75862,2.75862,0,0,0,.526-.94687L8,7.36875V3.79168C7.68438,3.79168,7.26354,3.89689,6.94792,3.89689Z" fill="#f1851b"/></svg>
|
After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 230 B |
1
Resources/Public/Icons/tx_events_domain_model_event.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polygon points="9.301 14.909 7.48 14.242 5.976 13.207 4.207 13.084 2.628 12.587 6.628 1.091 7.861 1.52 9.445 2.828 11.498 2.786 13.301 3.413 9.301 14.909" fill="#fff"/><line x1="3.50014" y1="9.8092" x2="3.90851" y2="9.9513" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.75"/><line x1="9.77353" y1="11.99201" x2="10.18191" y2="12.1341" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.75"/><line x1="5.03287" y1="10.34251" x2="6.50597" y2="10.85507" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.75"/><line x1="7.82721" y1="11.31479" x2="8.64397" y2="11.59898" fill="#f18519" stroke="#f18519" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.75"/><path d="M8.25714,1.3615,6.35555.69985,2.14913,12.78917,4.2008,13.503a1.82189,1.82189,0,0,1,2.92772,1.01869l2.2372.77842L13.57215,3.21083l-2.27135-.7903A1.80208,1.80208,0,0,1,8.25714,1.3615Z" fill="none" stroke="#b9b9b9" stroke-miterlimit="10" stroke-width="0.75"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 230 B |
|
@ -0,0 +1 @@
|
|||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10.77071,5.949a18.65037,18.65037,0,0,1-1.9384-.76481c.03454.11132.03982.16841-.02879.237a1.69858,1.69858,0,0,1-2.30305,0c-.06958-.06957-.05662-.12714-.01488-.2423A19.3485,19.3485,0,0,1,4.53327,5.949s-.67172.38384-.7197,1.87123h7.67685C11.44244,6.28486,10.77071,5.949,10.77071,5.949Z" fill="#f18519"/><path d="M9.28335,1.53478A1.40357,1.40357,0,0,0,7.84392.14334H7.46009A1.43426,1.43426,0,0,0,6.02066,1.53478v1.0556a2.17734,2.17734,0,0,0,.67341,1.39447l-.00023-.00017c-.0216,1.16208-.36943,1.26042-.19335,1.4365a1.69851,1.69851,0,0,0,2.303,0c.17661-.17655-.13335-.27489-.18422-1.4461a2.17267,2.17267,0,0,0,.664-1.3847ZM7.37457,4.417A.8868.8868,0,0,0,7.9305,4.4168a.8868.8868,0,0,1-.55593.00018Zm-.4858-.26213c.01867.01451.03746.02844.05648.04208C6.92617,4.18312,6.90744,4.16954,6.88877,4.15485Zm.22876.152a1.368,1.368,0,0,0,.12831.059A1.34963,1.34963,0,0,1,7.11753,4.30681Zm.946.05655c.04185-.01768.08377-.03513.12474-.05737C8.14726,4.32876,8.10546,4.34521,8.06355,4.36336Zm.30393-.17292c.01709-.01241.03406-.02482.05092-.03788C8.40154,4.16585,8.38457,4.17785,8.36748,4.19044Z" fill="#fdc759"/><rect x="3.81357" y="8.21754" width="7.67685" height="7.14809" fill="#fff" stroke="#b9b9b9" stroke-miterlimit="10"/><path d="M10.85547,4.05727v.00216a.72914.72914,0,0,1-.69619.694.69619.69619,0,1,1,.69619-.69619Z" fill="#fff" stroke="#b9b9b9" stroke-miterlimit="10" stroke-width="0.75"/><rect x="2.90692" y="7.32845" width="9.39595" height="2.14786" fill="#b9b9b9"/><path d="M11.44059,7.82023c.0425-.1802.47775-2.66642.47775-2.66642S10.8621,4.43553,10.744,4.4096" fill="none" stroke="#b9b9b9" stroke-miterlimit="10" stroke-width="0.75"/></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect x="3.6353" y="0.81108" width="8.72941" height="14.37784" fill="#fff"/><path d="M11.59446.29758H4.40554A1.28529,1.28529,0,0,0,3.1218,1.58132V14.41868a1.28529,1.28529,0,0,0,1.28374,1.28374h7.18892a1.28529,1.28529,0,0,0,1.28374-1.28374V1.58132A1.28529,1.28529,0,0,0,11.59446.29758Zm.77024,14.1211a.77023.77023,0,0,1-.77024.77024H4.40554a.77023.77023,0,0,1-.77024-.77024v-.25675h8.7294Zm0-.77024H3.6353V2.35156h8.7294Zm0-11.81037H3.6353V1.58132A.77023.77023,0,0,1,4.40554.81108h7.18892a.77023.77023,0,0,1,.77024.77024Z" fill="#b9b9b9" stroke="#b9b9b9" stroke-miterlimit="10" stroke-width="0.25"/><path d="M7,8.97781v-2.5l1.25.625,1.25.625-1.25.625Z" fill="#f1851b" stroke="#f18519" stroke-miterlimit="10" stroke-width="0.75"/></svg>
|
After Width: | Height: | Size: 827 B |
Before Width: | Height: | Size: 230 B |
1
Resources/Public/Icons/tx_events_domain_model_region.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.44338,4.44321a3.55662,3.55662,0,1,1,4.0012,3.52906v4.91792a.44458.44458,0,0,1-.88916,0v-4.917a3.55661,3.55661,0,0,1-3.112-3.53084ZM6.66,12.06683a.44458.44458,0,0,1-.36544.51127,5.05543,5.05543,0,0,0-1.47155.43835,1.17283,1.17283,0,0,0-.329.23563.26737.26737,0,0,0-.05068.08v.00267l.00178.00711a.13018.13018,0,0,0,.01422.02934.54862.54862,0,0,0,.12893.13338,2.43719,2.43719,0,0,0,.72288.35121A8.89157,8.89157,0,0,0,8,14.22392a8.86354,8.86354,0,0,0,2.68881-.36811,2.45929,2.45929,0,0,0,.72288-.35121.55047.55047,0,0,0,.12982-.13338.13117.13117,0,0,0,.01333-.02934l.00178-.00711v-.00356a.26749.26749,0,0,0-.05068-.08,1.17177,1.17177,0,0,0-.329-.23474A5.06425,5.06425,0,0,0,9.7054,12.5781a.44458.44458,0,1,1,.11939-.88111l.02643.0044a5.90316,5.90316,0,0,1,1.74008.52816,1.352,1.352,0,0,1,.85448,1.10522,1.12848,1.12848,0,0,1-.4837.8687,3.32,3.32,0,0,1-.9923.49615A9.744,9.744,0,0,1,8,15.11308a9.744,9.744,0,0,1-2.96978-.41346,3.32,3.32,0,0,1-.9923-.49615,1.12848,1.12848,0,0,1-.4837-.8687,1.35323,1.35323,0,0,1,.85448-1.10522,5.90307,5.90307,0,0,1,1.74008-.52816A.44457.44457,0,0,1,6.66,12.06683Z" fill="#b9b9b9" fill-rule="evenodd"/><circle cx="8" cy="4.47576" r="3.58884" fill="#f18519" stroke="#fff" stroke-miterlimit="10" stroke-width="0.75"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"/></svg>
|
Before Width: | Height: | Size: 426 B |
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Controller;
|
||||
|
||||
/**
|
||||
|
@ -13,7 +14,7 @@ class DateControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = $this->getMockBuilder(\Wrm\Events\Controller\DateController::class)
|
||||
|
@ -22,11 +23,6 @@ class DateControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
->getMock();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
@ -37,10 +33,10 @@ class DateControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$dateRepository = $this->getMockBuilder(\::class)
|
||||
->setMethods(['findAll'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
// $dateRepository = $this->getMockBuilder(\::class)
|
||||
// ->setMethods(['findAll'])
|
||||
// ->disableOriginalConstructor()
|
||||
// ->getMock();
|
||||
$dateRepository->expects(self::once())->method('findAll')->will(self::returnValue($allDates));
|
||||
$this->inject($this->subject, 'dateRepository', $dateRepository);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Controller;
|
||||
|
||||
/**
|
||||
|
@ -13,7 +14,7 @@ class EventControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = $this->getMockBuilder(\Wrm\Events\Controller\EventController::class)
|
||||
|
@ -22,11 +23,6 @@ class EventControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
->getMock();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
@ -37,10 +33,10 @@ class EventControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$eventRepository = $this->getMockBuilder(\::class)
|
||||
->setMethods(['findAll'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
// $eventRepository = $this->getMockBuilder(\::class)
|
||||
// ->setMethods(['findAll'])
|
||||
// ->disableOriginalConstructor()
|
||||
// ->getMock();
|
||||
$eventRepository->expects(self::once())->method('findAll')->will(self::returnValue($allEvents));
|
||||
$this->inject($this->subject, 'eventRepository', $eventRepository);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Controller;
|
||||
|
||||
/**
|
||||
|
@ -13,7 +14,7 @@ class EventsControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCas
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = $this->getMockBuilder(\Wrm\Events\Controller\EventsController::class)
|
||||
|
@ -22,11 +23,6 @@ class EventsControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCas
|
|||
->getMock();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
@ -37,10 +33,10 @@ class EventsControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCas
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$eventsRepository = $this->getMockBuilder(\::class)
|
||||
->setMethods(['findAll'])
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
// $eventsRepository = $this->getMockBuilder(\::class)
|
||||
// ->setMethods(['findAll'])
|
||||
// ->disableOriginalConstructor()
|
||||
// ->getMock();
|
||||
$eventsRepository->expects(self::once())->method('findAll')->will(self::returnValue($allEventss));
|
||||
$this->inject($this->subject, 'eventsRepository', $eventsRepository);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Domain\Model;
|
||||
|
||||
/**
|
||||
|
@ -13,17 +14,12 @@ class DateTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = new \Wrm\Events\Domain\Model\Date();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Domain\Model;
|
||||
|
||||
/**
|
||||
|
@ -13,17 +14,12 @@ class EventTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = new \Wrm\Events\Domain\Model\Event();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Domain\Model;
|
||||
|
||||
/**
|
||||
|
@ -13,17 +14,12 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = new \Wrm\Events\Domain\Model\Events();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
@ -506,7 +502,7 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
public function setDateForObjectStorageContainingSetsDate()
|
||||
{
|
||||
$date = new ();
|
||||
// $date = new ();
|
||||
$objectStorageHoldingExactlyOneDate = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$objectStorageHoldingExactlyOneDate->attach($date);
|
||||
$this->subject->setDate($objectStorageHoldingExactlyOneDate);
|
||||
|
@ -523,7 +519,7 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
public function addDateToObjectStorageHoldingDate()
|
||||
{
|
||||
$date = new ();
|
||||
// $date = new ();
|
||||
$dateObjectStorageMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
|
||||
->setMethods(['attach'])
|
||||
->disableOriginalConstructor()
|
||||
|
@ -540,7 +536,7 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
public function removeDateFromObjectStorageHoldingDate()
|
||||
{
|
||||
$date = new ();
|
||||
// $date = new ();
|
||||
$dateObjectStorageMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
|
||||
->setMethods(['detach'])
|
||||
->disableOriginalConstructor()
|
||||
|
@ -569,7 +565,7 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
public function setRegionForObjectStorageContainingSetsRegion()
|
||||
{
|
||||
$region = new ();
|
||||
// $region = new ();
|
||||
$objectStorageHoldingExactlyOneRegion = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$objectStorageHoldingExactlyOneRegion->attach($region);
|
||||
$this->subject->setRegion($objectStorageHoldingExactlyOneRegion);
|
||||
|
@ -586,7 +582,7 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
public function addRegionToObjectStorageHoldingRegion()
|
||||
{
|
||||
$region = new ();
|
||||
// $region = new ();
|
||||
$regionObjectStorageMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
|
||||
->setMethods(['attach'])
|
||||
->disableOriginalConstructor()
|
||||
|
@ -603,7 +599,7 @@ class EventsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
public function removeRegionFromObjectStorageHoldingRegion()
|
||||
{
|
||||
$region = new ();
|
||||
// $region = new ();
|
||||
$regionObjectStorageMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
|
||||
->setMethods(['detach'])
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Domain\Model;
|
||||
|
||||
/**
|
||||
|
@ -13,17 +14,12 @@ class OrganizerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = new \Wrm\Events\Domain\Model\Organizer();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace Wrm\Events\Tests\Unit\Domain\Model;
|
||||
|
||||
/**
|
||||
|
@ -13,17 +14,12 @@ class RegionTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
|
|||
*/
|
||||
protected $subject = null;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->subject = new \Wrm\Events\Domain\Model\Region();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"typo3/cms-core": "^9.5"
|
||||
"typo3/cms-core": "^10.4",
|
||||
"typo3/cms-extbase": "^10.4",
|
||||
"typo3/cms-fluid": "^10.4"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -21,8 +23,14 @@
|
|||
"Wrm\\Events\\Tests\\": "Tests"
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
"events": "self.version",
|
||||
"typo3-ter/events": "self.version"
|
||||
"extra": {
|
||||
"typo3/cms": {
|
||||
"extension-key": "events"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"typo3/testing-framework": "^6.6"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
<?php
|
||||
|
||||
/**************************************************************
|
||||
* Extension Manager/Repository config file for ext: "events"
|
||||
*
|
||||
* Auto generated by Extension Builder 2019-04-03
|
||||
*
|
||||
* Manual updates:
|
||||
* Only the data in the array - anything else is removed by next write.
|
||||
* "version" and "dependencies" must not be touched!
|
||||
***************************************************************/
|
||||
|
||||
$EM_CONF[$_EXTKEY] = [
|
||||
$EM_CONF['events'] = [
|
||||
'title' => 'Events',
|
||||
'description' => 'Extension to manage events',
|
||||
'category' => 'plugin',
|
||||
|
|
|
@ -1,71 +1,43 @@
|
|||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
defined('TYPO3') || die('Access denied.');
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Wrm.Events',
|
||||
'DateSearch',
|
||||
[
|
||||
'Date' => 'search'
|
||||
],
|
||||
[
|
||||
'Date' => 'search'
|
||||
]
|
||||
);
|
||||
call_user_func(function () {
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Events',
|
||||
'DateSearch',
|
||||
[\Wrm\Events\Controller\DateController::class => 'search'],
|
||||
[\Wrm\Events\Controller\DateController::class => 'search']
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Wrm.Events',
|
||||
'DateList',
|
||||
[
|
||||
'Date' => 'list'
|
||||
],
|
||||
[
|
||||
'Date' => 'list'
|
||||
]
|
||||
);
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Events',
|
||||
'DateList',
|
||||
[\Wrm\Events\Controller\DateController::class => 'list'],
|
||||
[\Wrm\Events\Controller\DateController::class => 'list']
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Wrm.Events',
|
||||
'DateShow',
|
||||
[
|
||||
'Date' => 'show'
|
||||
],
|
||||
[
|
||||
'Date' => 'show'
|
||||
]
|
||||
);
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Events',
|
||||
'DateShow',
|
||||
[\Wrm\Events\Controller\DateController::class => 'show'],
|
||||
[\Wrm\Events\Controller\DateController::class => 'show']
|
||||
);
|
||||
|
||||
/*
|
||||
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||||
'Events',
|
||||
'Selected',
|
||||
[\Wrm\Events\Controller\EventController::class => 'list']
|
||||
);
|
||||
|
||||
$iconRegistry->registerIcon(
|
||||
'events-plugin',
|
||||
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
['source' => 'EXT:events/Resources/Public/Icons/user_plugin_events.svg']
|
||||
);
|
||||
|
||||
// wizards
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
||||
'mod {
|
||||
wizards.newContentElement.wizardItems.plugins {
|
||||
elements {
|
||||
events {
|
||||
iconIdentifier = events-plugin
|
||||
title = LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events.name
|
||||
description = LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events.description
|
||||
tt_content_defValues {
|
||||
CType = list
|
||||
list_type = events_pi1
|
||||
}
|
||||
}
|
||||
}
|
||||
show = *
|
||||
}
|
||||
}'
|
||||
);
|
||||
*/
|
||||
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category'])) {
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['events_category'] = [];
|
||||
}
|
||||
);
|
||||
|
||||
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
|
||||
$iconRegistry->registerIcon(
|
||||
'events-plugin',
|
||||
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
|
||||
['source' => 'EXT:events/Resources/Public/Icons/Extension.svg']
|
||||
);
|
||||
});
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
<?php
|
||||
defined('TYPO3_MODE') || die('Access denied.');
|
||||
|
||||
defined('TYPO3') || die('Access denied.');
|
||||
|
||||
call_user_func(
|
||||
function()
|
||||
{
|
||||
|
||||
/*
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'Wrm.Events',
|
||||
'Pi1',
|
||||
'Events',
|
||||
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
|
||||
);
|
||||
*/
|
||||
function () {
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('events', 'Configuration/TypoScript', 'Events');
|
||||
|
||||
|
@ -27,6 +18,5 @@ call_user_func(
|
|||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_events_domain_model_region', 'EXT:events/Resources/Private/Language/locallang_csh_tx_events_domain_model_region.xlf');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_events_domain_model_region');
|
||||
|
||||
}
|
||||
);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
CREATE TABLE tx_events_domain_model_event (
|
||||
|
||||
title varchar(255) DEFAULT '' NOT NULL,
|
||||
subtitle text,
|
||||
global_id varchar(255) DEFAULT '' NOT NULL,
|
||||
slug varchar(255) DEFAULT '' NOT NULL,
|
||||
highlight smallint(5) unsigned DEFAULT '0' NOT NULL,
|
||||
|
@ -26,9 +27,12 @@ CREATE TABLE tx_events_domain_model_event (
|
|||
longitude varchar(255) DEFAULT '' NOT NULL,
|
||||
images int(11) unsigned NOT NULL default '0',
|
||||
categories int(11) DEFAULT '0' NOT NULL,
|
||||
pages text,
|
||||
dates int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
organizer int(11) unsigned DEFAULT '0',
|
||||
partner text,
|
||||
region int(11) unsigned DEFAULT '0',
|
||||
references_events text,
|
||||
KEY dataHandler (l10n_parent, t3ver_oid, deleted, t3ver_wsid, t3ver_state)
|
||||
);
|
||||
|
||||
|
@ -49,6 +53,18 @@ CREATE TABLE tx_events_domain_model_organizer (
|
|||
KEY dataHandler (l10n_parent, sys_language_uid, deleted)
|
||||
);
|
||||
|
||||
#
|
||||
# Table structure for table 'tx_events_domain_model_partner'
|
||||
#
|
||||
CREATE TABLE tx_events_domain_model_partner (
|
||||
|
||||
title varchar(255) DEFAULT '' NOT NULL,
|
||||
link varchar(255) DEFAULT '' NOT NULL,
|
||||
images int(11) unsigned NOT NULL default '0',
|
||||
|
||||
KEY dataHandler (l10n_parent, sys_language_uid, deleted)
|
||||
);
|
||||
|
||||
#
|
||||
# Table structure for table 'tx_events_domain_model_date'
|
||||
#
|
||||
|
@ -56,6 +72,7 @@ CREATE TABLE tx_events_domain_model_date (
|
|||
event int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
start int(11) DEFAULT NULL,
|
||||
end int(11) DEFAULT NULL,
|
||||
canceled varchar(255) DEFAULT 'no' NOT NULL,
|
||||
KEY event (event),
|
||||
KEY dataHandler (event, t3ver_wsid, pid)
|
||||
);
|
||||
|
@ -75,5 +92,7 @@ CREATE TABLE tx_events_domain_model_region (
|
|||
CREATE TABLE tx_events_domain_model_date (
|
||||
|
||||
event int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
postponed_date int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
canceled_link varchar(1024) DEFAULT '' NOT NULL,
|
||||
|
||||
);
|
||||
|
|
26
phpcs.xml.dist
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="project">
|
||||
<description>This project coding standard</description>
|
||||
|
||||
<file>Classes/</file>
|
||||
<file>Tests/</file>
|
||||
<file>ext_localconf.php</file>
|
||||
<file>ext_tables.php</file>
|
||||
|
||||
<!-- Set default settings -->
|
||||
<arg value="sp"/>
|
||||
<arg name="colors"/>
|
||||
<arg name="encoding" value="utf-8" />
|
||||
<arg name="extensions" value="php" />
|
||||
|
||||
<!-- Base rules -->
|
||||
<rule ref="PSR12">
|
||||
<!-- Ignore some rules for now. -->
|
||||
<!-- Otherwise we would need some more adjustments to the code. -->
|
||||
<!-- We can clean these rules up in the future -->
|
||||
<exclude name="Generic.Files.LineLength.TooLong" />
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
||||
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
|
||||
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore" />
|
||||
</rule>
|
||||
</ruleset>
|