Merge branch 'dev' into 'master'

Merge dev to master before upgrade

See merge request typo3/events!2
This commit is contained in:
Dirk Koritnik 2021-01-05 15:53:23 +01:00
commit 77a10e7083
108 changed files with 10177 additions and 2 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/vendor/

View file

@ -0,0 +1,59 @@
<?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\Extbase\Object\ObjectManager;
use Wrm\Events\Service\DestinationDataImportService;
class DestinationDataImportCommand extends Command {
public function configure()
{
$this->setDescription('Import Destination Data Events');
$this->setHelp('Destination Data Events are imported');
$this->addArgument(
'storage-pid',
InputArgument::OPTIONAL,
'What is the storage pid?',
'6'
);
$this->addArgument(
'region-uid',
InputArgument::OPTIONAL,
'What is the region uid?',
'1'
);
$this->addArgument('rest-experience',
InputArgument::OPTIONAL,
'What is the rest experience?',
'stadtmarketing-erfurt'
);
$this->addArgument('files-folder',
InputArgument::OPTIONAL,
'Where to save the image files?',
'staedte/erfurt/events/'
);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
Bootstrap::initializeBackendAuthentication();
return GeneralUtility::makeInstance(ObjectManager::class)
->get(DestinationDataImportService::class)
->import(
$input->getArgument('rest-experience'),
$input->getArgument('storage-pid'),
$input->getArgument('region-uid'),
$input->getArgument('files-folder')
);
}
}

View file

@ -0,0 +1,28 @@
<?php
namespace Wrm\Events\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use Wrm\Events\Service\CleanupService;
class RemoveAllCommand extends Command
{
public function configure()
{
$this->setDescription('Remove all event data');
$this->setHelp('All events and associated data will be removed.');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
Bootstrap::initializeBackendAuthentication();
return GeneralUtility::makeInstance(ObjectManager::class)
->get(CleanupService::class)
->deleteAllData();
}
}

View file

@ -0,0 +1,28 @@
<?php
namespace Wrm\Events\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use Wrm\Events\Service\CleanupService;
class RemovePastCommand extends Command
{
public function configure()
{
$this->setDescription('Remove past events');
$this->setHelp('Past dates are removed, together with events that do not have any left dates.');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
Bootstrap::initializeBackendAuthentication();
return GeneralUtility::makeInstance(ObjectManager::class)
->get(CleanupService::class)
->deletePastData();
}
}

View file

@ -0,0 +1,182 @@
<?php
namespace Wrm\Events\Controller;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Wrm\Events\Domain\Model\Dto\DateDemand;
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;
/**
* DateController
*/
class DateController extends ActionController
{
/**
* @var dateRepository
*/
protected $dateRepository;
/**
* @var regionRepository
*/
protected $regionRepository;
/**
* @var QueryGenerator
*/
protected $queryGenerator;
/**
* @var array
*/
protected $pluginSettings;
/*
* @param RegionRepository $regionRepository
* @param DateRepository $dateRepository
*/
public function __construct(
RegionRepository $regionRepository,
DateRepository $dateRepository
) {
$this->regionRepository = $regionRepository;
$this->dateRepository = $dateRepository;
}
/**
* Action initializer
*/
protected function initializeAction()
{
$this->pluginSettings = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
);
}
/**
* action list
*
* @return void
*/
public function listAction()
{
if (($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '') ||
($this->request->hasArgument('region') && $this->request->getArgument('region') != '') ||
($this->request->hasArgument('start') && $this->request->getArgument('start') != '') ||
($this->request->hasArgument('end') && $this->request->getArgument('end') != ''))
{
$demand = $this->createDemandFromSearch();
$dates = $this->dateRepository->findByDemand($demand);
} else {
$demand = $this->createDemandFromSettings();
$dates = $this->dateRepository->findByDemand($demand);
}
$this->view->assign('dates', $dates);
}
/**
* @return void
*/
public function searchAction()
{
$arguments = GeneralUtility::_GET('tx_events_datelist');
$searchword = $arguments['searchword'];
$selRegion = $arguments['region'];
$start = $arguments['start'];
$end = $arguments['end'];
$considerDate = $arguments['considerDate'];
$regions = $this->regionRepository->findAll();
$this->view->assign('regions', $regions);
$this->view->assign('searchword', $searchword);
$this->view->assign('selRegion', $selRegion);
$this->view->assign('start', $start);
$this->view->assign('end', $end);
$this->view->assign('considerDate', $considerDate);
}
/**
* action teaser
*
* @return void
*/
public function teaserAction()
{
$dates = $this->dateRepository->findByUids($this->settings['eventUids']);
$this->view->assign('dates', $dates);
}
/**
* action show
*
* @param \Wrm\Events\Domain\Model\Date $date
* @return void
*/
public function showAction(\Wrm\Events\Domain\Model\Date $date)
{
$this->view->assign('date', $date);
}
/**
* @return DateDemand
*/
protected function createDemandFromSettings(): DateDemand
{
$demand = $this->objectManager->get(DateDemand::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['sortByDate']);
$demand->setSortOrder((string)$this->settings['sortOrder']);
$demand->setHighlight((int)$this->settings['highlight']);
if (!empty($this->settings['limit'])) {
$demand->setLimit($this->settings['limit']);
}
return $demand;
}
/**
* @return DateDemand
*/
protected function createDemandFromSearch(): DateDemand
{
$demand = $this->objectManager->get(DateDemand::class);
if ($this->request->hasArgument('region') && $this->request->getArgument('region') != '')
$demand->setRegion((string)$this->request->getArgument('region'));
if ($this->request->hasArgument('highlight') && $this->request->hasArgument('highlight') != '')
$demand->setHighlight((int)$this->settings['highlight']);
if ($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '')
$demand->setSearchword((string)$this->request->getArgument('searchword'));
if ($this->request->hasArgument('start') && $this->request->getArgument('start') != '')
$demand->setStart(strtotime($this->request->getArgument('start') . ' 00:00'));
if ($this->request->hasArgument('end') && $this->request->getArgument('end') != '')
$demand->setEnd(strtotime($this->request->getArgument('end') . ' 23:59'));
if ($this->request->hasArgument('considerDate') && $this->request->getArgument('considerDate') != '')
$demand->setConsiderDate(strtotime($this->request->getArgument('considerDate')));
$demand->setSortBy((string)$this->settings['sortByDate']);
$demand->setSortOrder((string)$this->settings['sortOrder']);
if (!empty($this->settings['limit'])) {
$demand->setLimit($this->settings['limit']);
}
return $demand;
}
}

View file

@ -0,0 +1,130 @@
<?php
namespace Wrm\Events\Controller;
use Wrm\Events\Domain\Model\Dto\EventDemand;
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;
/**
* EventController
*/
class EventController extends ActionController
{
/**
* @var eventRepository
*/
protected $eventRepository = null;
/**
* @var QueryGenerator
*/
protected $queryGenerator;
/**
* @var array
*/
protected $pluginSettings;
/**
* @param EventRepository $eventRepository
*/
public function injectEventRepository(EventRepository $eventRepository)
{
$this->eventRepository = $eventRepository;
}
/**
* Action initializer
*/
protected function initializeAction()
{
$this->pluginSettings = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
);
}
/**
* Action list
*
* @return void
*/
public function listAction()
{
$demand = $this->createDemandFromSettings();
$events = $this->eventRepository->findByDemand($demand);
$this->view->assign('events', $events);
}
/**
* Action show
*
* @param Event $event
* @return void
*/
public function showAction(Event $event)
{
$this->view->assign('event', $event);
}
/**
* action teaser
*
* @return void
*/
public function teaserAction()
{
$events = $this->eventRepository->findByUids($this->settings['eventUids']);
$this->view->assign('events', $events);
}
/**
* @param string $search
*/
public function searchAction(): 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;
}
}

View file

@ -0,0 +1,97 @@
<?php
namespace Wrm\Events\Domain\Model;
/**
* Date
*/
class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* @var \DateTime
*/
protected $start = null;
/**
* @var \DateTime
*/
protected $end = null;
/**
* @var \Wrm\Events\Domain\Model\Event
*/
protected $event = null;
/**
* @var int
*/
protected $_languageUid;
/**
* @return \DateTime $start
*/
public function getStart()
{
return $this->start;
}
/**
* @param \DateTime $start
* @return void
*/
public function setStart(\DateTime $start)
{
$this->start = $start;
}
/**
* @return \DateTime end
*/
public function getEnd()
{
return $this->end;
}
/**
* @param \DateTime $end
* @return void
*/
public function setEnd(\DateTime $end)
{
$this->end = $end;
}
/**
* @return Event
*/
public function getEvent(): Event
{
return $this->event;
}
/**
* @param Event $event
*/
public function setEvent(Event $event): self
{
$this->event = $event;
return $this;
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid) {
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid() {
return $this->_languageUid;
}
}

View file

@ -0,0 +1,259 @@
<?php
namespace Wrm\Events\Domain\Model\Dto;
class DateDemand {
/**
* @var string
*/
protected $sortBy = '';
/**
* @var string
*/
protected $sortOrder = '';
/**
* @var string
*/
protected $categories = '';
/**
* @var bool
*/
protected $includeSubCategories = false;
/**
* @var string
*/
protected $categoryCombination = '';
/**
* @var string
*/
protected $region = '';
/**
* @var bool
*/
protected $highlight = 0;
/**
* @var string
*/
protected $limit = '';
/**
* @var string
*/
protected $start = '';
/**
* @var string
*/
protected $end = '';
/**
* @var string
*/
protected $searchword = '';
/**
* @var bool
*/
protected $considerDate = 0;
/**
* @return string
*/
public function getSortBy(): string
{
return $this->sortBy;
}
/**
* @param string $sortBy
*/
public function setSortBy(string $sortBy)
{
$this->sortBy = $sortBy;
}
/**
* @return string
*/
public function getSortOrder(): string
{
return $this->sortOrder;
}
/**
* @param string $sortOrder
*/
public function setSortOrder(string $sortOrder)
{
$this->sortOrder = $sortOrder;
}
/**
* @return string
*/
public function getCategories(): string
{
return $this->categories;
}
/**
* @param string $categories
*/
public function setCategories(string $categories)
{
$this->categories = $categories;
}
/**
* @return bool
*/
public function getIncludeSubCategories(): bool
{
return $this->includeSubCategories;
}
/**
* @param bool $includeSubCategories
*/
public function setIncludeSubCategories(bool $includeSubCategories)
{
$this->includeSubCategories = $includeSubCategories;
}
/**
* @return string
*/
public function getCategoryCombination(): string
{
return $this->categoryCombination;
}
/**
* @param string $categoryCombination
*/
public function setCategoryCombination(string $categoryCombination)
{
$this->categoryCombination = $categoryCombination;
}
/**
* @return string
*/
public function getRegion(): string
{
return $this->region;
}
/**
* @param \Wrm\DdEvents\Domain\Model\Region $region
*/
public function setRegion(string $region): void
{
$this->region = $region;
}
/**
* @return bool
*/
public function getHighlight(): bool
{
return $this->highlight;
}
/**
* @param bool $highlight
*/
public function setHighlight(string $highlight): void
{
$this->highlight = $highlight;
}
/**
* @return string
*/
public function getLimit(): string
{
return $this->limit;
}
/**
* @param string $limit
*/
public function setLimit(string $limit): void
{
$this->limit = $limit;
}
/**
* @return string
*/
public function getSearchword(): string
{
return $this->searchword;
}
/**
* @param string $searchword
*/
public function setSearchword(string $searchword): void
{
$this->searchword = $searchword;
}
/**
* @return string
*/
public function getStart(): string
{
return $this->start;
}
/**
* @param string $start
*/
public function setStart(string $start): void
{
$this->start = $start;
}
/**
* @return string
*/
public function getEnd(): string
{
return $this->end;
}
/**
* @param string $end
*/
public function setEnd(string $end): void
{
$this->end = $end;
}
/**
* @return bool
*/
public function getConsiderDate(): bool
{
return $this->considerDate;
}
/**
* @param bool $considerDate
*/
public function setConsiderDate(string $considerDate): void
{
$this->considerDate = $considerDate;
}
}

View file

@ -0,0 +1,177 @@
<?php
namespace Wrm\Events\Domain\Model\Dto;
class EventDemand {
/**
* @var string
*/
protected $sortBy = '';
/**
* @var string
*/
protected $sortOrder = '';
/**
* @var string
*/
protected $categories = '';
/**
* @var bool
*/
protected $includeSubCategories = false;
/**
* @var string
*/
protected $categoryCombination = '';
/**
* @var string
*/
protected $region = null;
/**
* @var bool
*/
protected $highlight = false;
/**
* @var string
*/
protected $limit = '';
/**
* @return string
*/
public function getSortBy(): string
{
return $this->sortBy;
}
/**
* @param string $sortBy
*/
public function setSortBy(string $sortBy)
{
$this->sortBy = $sortBy;
}
/**
* @return string
*/
public function getSortOrder(): string
{
return $this->sortOrder;
}
/**
* @param string $sortOrder
*/
public function setSortOrder(string $sortOrder)
{
$this->sortOrder = $sortOrder;
}
/**
* @return string
*/
public function getCategories(): string
{
return $this->categories;
}
/**
* @param string $categories
*/
public function setCategories(string $categories)
{
$this->categories = $categories;
}
/**
* @return bool
*/
public function getIncludeSubCategories(): bool
{
return $this->includeSubCategories;
}
/**
* @param bool $includeSubCategories
*/
public function setIncludeSubCategories(bool $includeSubCategories)
{
$this->includeSubCategories = $includeSubCategories;
}
/**
* @return string
*/
public function getCategoryCombination(): string
{
return $this->categoryCombination;
}
/**
* @param string $categoryCombination
*/
public function setCategoryCombination(string $categoryCombination)
{
$this->categoryCombination = $categoryCombination;
}
/**
* @return string
*/
public function getRegion(): string
{
return $this->region;
}
/**
* @param \Wrm\DdEvents\Domain\Model\Region $region
*/
public function setRegion(string $region): void
{
$this->region = $region;
}
/**
* @return bool
*/
public function getHighlight(): bool
{
return $this->highlight;
}
/**
* @param bool $hightlight
*/
public function setHighlight(bool $highlight): void
{
$this->highlight = $highlight;
}
/**
* @return string
*/
public function getLimit(): string
{
return $this->limit;
}
/**
* @param string $limit
*/
public function setLimit(string $limit): void
{
$this->limit = $limit;
}
}

View file

@ -0,0 +1,725 @@
<?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\Object\ObjectManager;
use \TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* Event
*/
class Event extends AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
/**
* 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 = '';
/**
* phone
*
* @var string
*/
protected $phone = '';
/**
* 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
*/
protected $images = null;
/**
* dates
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Wrm\Events\Domain\Model\Date>
* @cascade remove
*/
protected $dates = null;
/**
* organizer
*
* @var \Wrm\Events\Domain\Model\Organizer
*/
protected $organizer = null;
/**
* region
*
* @var \Wrm\Events\Domain\Model\Region
*/
protected $region = null;
/**
* categories
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
*/
protected $categories;
/**
* @var int
*/
protected $_languageUid;
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* @return void
*/
protected function initStorageObjects()
{
$this->dates = new ObjectStorage();
}
/**
* Returns the globalId
*
* @return string $globalId
*/
public function getGlobalId()
{
return $this->globalId;
}
/**
* @param string $globalId
* @return void
*/
public function setGlobalId($globalId)
{
$this->globalId = $globalId;
}
/**
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string $title
* @return void
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string $teaser
*/
public function getTeaser()
{
return $this->teaser;
}
/**
* @param string $teaser
* @return void
*/
public function setTeaser($teaser)
{
$this->teaser = $teaser;
}
/**
* @return string $details
*/
public function getDetails()
{
return $this->details;
}
/**
* @param string $details
* @return void
*/
public function setDetails($details)
{
$this->details = $details;
}
/**
* @return string $priceInfo
*/
public function getPriceInfo()
{
return $this->priceInfo;
}
/**
* @param string $priceInfo
* @return void
*/
public function setPriceInfo($priceInfo)
{
$this->priceInfo = $priceInfo;
}
/**
* @return string $name
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
* @return void
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string $street
*/
public function getStreet()
{
return $this->street;
}
/**
* @param string $street
* @return void
*/
public function setStreet($street)
{
$this->street = $street;
}
/**
* @return string $district
*/
public function getDistrict()
{
return $this->district;
}
/**
* @param string $district
* @return void
*/
public function setDistrict($district)
{
$this->district = $district;
}
/**
* @return string $city
*/
public function getCity()
{
return $this->city;
}
/**
* @param string $city
* @return void
*/
public function setCity($city)
{
$this->city = $city;
}
/**
* @return string $zip
*/
public function getZip()
{
return $this->zip;
}
/**
* @param string $zip
* @return void
*/
public function setZip($zip)
{
$this->zip = $zip;
}
/**
* @return string
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param string $phone
*/
public function setPhone($phone)
{
$this->phone = $phone;
}
/**
* @return string $web
*/
public function getWeb()
{
return $this->web;
}
/**
* @param string $web
* @return void
*/
public function setWeb($web)
{
$this->web = $web;
}
/**
* @return string $ticket
*/
public function getTicket()
{
return $this->ticket;
}
/**
* @param string $ticket
* @return void
*/
public function setTicket($ticket)
{
$this->ticket = $ticket;
}
/**
* @return string $facebook
*/
public function getFacebook()
{
return $this->facebook;
}
/**
* @param string $facebook
* @return void
*/
public function setFacebook($facebook)
{
$this->facebook = $facebook;
}
/**
* @return string $youtube
*/
public function getYoutube()
{
return $this->youtube;
}
/**
* @param string $youtube
* @return void
*/
public function setYoutube($youtube)
{
$this->youtube = $youtube;
}
/**
* @return string $instagram
*/
public function getInstagram()
{
return $this->instagram;
}
/**
* @param string $instagram
*/
public function setInstagram(string $instagram)
{
$this->instagram = $instagram;
}
/**
* @return string $latitude
*/
public function getLatitude()
{
return $this->latitude;
}
/**
* @param string $latitude
* @return void
*/
public function setLatitude($latitude)
{
$this->latitude = $latitude;
}
/**
* @return string $longitude
*/
public function getLongitude()
{
return $this->longitude;
}
/**
* @param string $longitude
* @return void
*/
public function setLongitude($longitude)
{
$this->longitude = $longitude;
}
/**
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
*/
public function getImages()
{
return $this->images;
}
/**
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
* @return void
*/
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $images)
{
$this->images = $images;
}
/**
* @return string $slug
*/
public function getSlug()
{
return $this->slug;
}
/**
* @param string $slug
* @return void
*/
public function setSlug($slug)
{
$this->slug = $slug;
}
/**
* @param Date $date
* @return Event
*/
public function addDate(Date $date): self
{
$this->dates->attach($date);
return $this;
}
/**
* @param Date $date
* @return Event
*/
public function removeDate(Date $date): self
{
$this->dates->detach($date);
return $this;
}
/**
* @return ObjectStorage
*/
public function getDates(): ObjectStorage
{
return $this->dates;
}
/**
* @param ObjectStorage $dates
*
* @return Event
*/
public function setDates($dates): self
{
$this->dates = $dates;
return $this;
}
/**
* @param ObjectStorage $dates
* @return void
*/
public function removeAllDates(ObjectStorage $dates) {
$this->dates->removeAll($dates);
}
/**
* @return \Wrm\Events\Domain\Model\Organizer $organizer
*/
public function getOrganizer()
{
return $this->organizer;
}
/**
* @param \Wrm\Events\Domain\Model\Organizer $organizer
* @return void
*/
public function setOrganizer(\Wrm\Events\Domain\Model\Organizer $organizer)
{
$this->organizer = $organizer;
}
/**
* @return \Wrm\Events\Domain\Model\Region $region
*/
public function getRegion()
{
return $this->region;
}
/**
* @param \Wrm\Events\Domain\Model\Region $region
* @return void
*/
public function setRegion(\Wrm\Events\Domain\Model\Region $region)
{
$this->region = $region;
}
/**
* @return bool $highlight
*/
public function getHighlight()
{
return $this->highlight;
}
/**
* @param bool $highlight
* @return void
*/
public function setHighlight($highlight)
{
$this->highlight = $highlight;
}
/**
* @return bool
*/
public function isHighlight()
{
return $this->highlight;
}
/**
* @return string $country
*/
public function getCountry()
{
return $this->country;
}
/**
* @param string $country
* @return void
*/
public function setCountry($country)
{
$this->country = $country;
}
/**
* @param \TYPO3\CMS\Extbase\Domain\Model\Category<\TYPO3\CMS\Extbase\Domain\Model\Category> $category
*/
public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
{
$this->categories->attach($category);
}
/**
* @return $categories
*/
public function getCategories()
{
return $this->categories;
}
/**
* @param TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> $categories
*/
public function setCategories(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories)
{
$this->categories = $categories;
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid) {
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid() {
return $this->_languageUid;
}
}

View file

@ -0,0 +1,286 @@
<?php
namespace Wrm\Events\Domain\Model;
/***
*
* This file is part of the "DD Events" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019 Dirk Koritnik <koritnik@werkraum-media.de>
*
***/
/**
* Organizer
*/
class Organizer extends \TYPO3\CMS\Extbase\DomainObject\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 = '';
/**
* @var int
*/
protected $_languageUid;
/**
* Returns the name
*
* @return string $name
*/
public function getName()
{
return $this->name;
}
/**
* Sets the name
*
* @param string $name
* @return void
*/
public function setName($name)
{
$this->name = $name;
}
/**
* Returns the street
*
* @return string $street
*/
public function getStreet()
{
return $this->street;
}
/**
* Sets the street
*
* @param string $street
* @return void
*/
public function setStreet($street)
{
$this->street = $street;
}
/**
* Returns the district
*
* @return string $district
*/
public function getDistrict()
{
return $this->district;
}
/**
* Sets the district
*
* @param string $district
* @return void
*/
public function setDistrict($district)
{
$this->district = $district;
}
/**
* Returns the city
*
* @return string $city
*/
public function getCity()
{
return $this->city;
}
/**
* Sets the city
*
* @param string $city
* @return void
*/
public function setCity($city)
{
$this->city = $city;
}
/**
* Returns the zip
*
* @return string $zip
*/
public function getZip()
{
return $this->zip;
}
/**
* Sets the zip
*
* @param string $zip
* @return void
*/
public function setZip($zip)
{
$this->zip = $zip;
}
/**
* Returns the phone
*
* @return string $phone
*/
public function getPhone()
{
return $this->phone;
}
/**
* Sets the phone
*
* @param string $phone
* @return void
*/
public function setPhone($phone)
{
$this->phone = $phone;
}
/**
* Returns the web
*
* @return string $web
*/
public function getWeb()
{
return $this->web;
}
/**
* Sets the web
*
* @param string $web
* @return void
*/
public function setWeb($web)
{
$this->web = $web;
}
/**
* Returns the email
*
* @return string $email
*/
public function getEmail()
{
return $this->email;
}
/**
* Sets the email
*
* @param string $email
* @return void
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* 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()
{
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid) {
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid() {
return $this->_languageUid;
}
}

View file

@ -0,0 +1,90 @@
<?php
namespace Wrm\Events\Domain\Model;
/***
*
* This file is part of the "DD Events" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019 Dirk Koritnik <koritnik@werkraum-media.de>
*
***/
/**
* Region
*/
class Region extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* title
*
* @var string
*/
protected $title = '';
/**
* @var int
*/
protected $_languageUid;
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
* @return void
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
* 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()
{
}
/**
* @param int $languageUid
* @return void
*/
public function setLanguageUid($languageUid) {
$this->_languageUid = $languageUid;
}
/**
* @return int
*/
public function getLanguageUid() {
return $this->_languageUid;
}
}

View file

@ -0,0 +1,160 @@
<?php
namespace Wrm\Events\Domain\Repository;
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\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
/**
* Find all dates based on selected uids
* @param string $uids
* @return array
*/
public function findByUids($uids)
{
$uids = explode(',', $uids);
$query = $this->createQuery();
$query->matching(
$query->in('uid', $uids)
);
return $query->execute();
}
/**
* @param DateDemand $demand
* @return QueryResultInterface
* @throws InvalidQueryException
*/
public function findByDemand(DateDemand $demand)
{
$query = $this->createDemandQuery($demand);
return $query->execute();
// For testing purposes
// $query = $this->createDemandQueryViaBuilder($demand);
// return $query->execute()->fetchAll();
}
/**
* @param DateDemand $demand
* @return QueryInterface
* @throws InvalidQueryException
*/
protected function createDemandQuery(DateDemand $demand): QueryInterface
{
$query = $this->createQuery();
$constraints = [];
$categories = $demand->getCategories();
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->getRegion() !== '') {
$constraints['region'] = $query->equals('event.region', $demand->getRegion());
}
if ($demand->getHighlight() !== FALSE) {
$constraints['highlight'] = $query->equals('event.highlight', $demand->getHighlight());
}
if ($demand->getSearchword() !== '') {
$constraints['searchword'] = $query->logicalOr(
[
$query->like('event.title', '%' . $demand->getSearchword() . '%'),
$query->like('event.teaser', '%' . $demand->getSearchword() . '%')
]
);
}
if ($demand->getStart() !== '' && $demand->getEnd() != '') {
$constraints['daterange'] = $query->logicalAnd(
[
$query->greaterThanOrEqual('start', $demand->getStart()),
$query->lessThanOrEqual('end', $demand->getEnd())
]
);
} else {
$now = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
$constraints['untilnow'] = $query->greaterThanOrEqual('start', $now);
}
if ($demand->getLimit() !== '') {
$query->setLimit((int) $demand->getLimit());
}
if (!empty($constraints)) {
$query->matching($query->logicalAnd($constraints));
}
$query->setOrderings([$demand->getSortBy() => $demand->getSortOrder()]);
return $query;
}
/**
* @param QueryInterface $query
* @param string $categories
* @param bool $includeSubCategories
* @return array
* @throws InvalidQueryException
*/
protected function createCategoryConstraint(QueryInterface $query, $categories, bool $includeSubCategories = false): array
{
$constraints = [];
if ($includeSubCategories) {
$categoryService = GeneralUtility::makeInstance(CategoryService::class);
$allCategories = $categoryService->getChildrenCategories($categories);
if (!\is_array($allCategories)) {
$allCategories = GeneralUtility::intExplode(',', $allCategories, true);
}
} else {
$allCategories = GeneralUtility::intExplode(',', $categories, true);
}
foreach ($allCategories as $category) {
$constraints[] = $query->contains('event.categories', $category);
}
return $constraints;
}
/**
* findSearchWord with Query Builder
* @param $search
*/
public function findSearchWord($search)
{
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable('tx_events_domain_model_date');
$queryBuilder = $connection->createQueryBuilder();
$statement = $queryBuilder
->select('*')
->from('tx_events_domain_model_date')
->join(
'tx_events_domain_model_date',
'tx_events_domain_model_event',
'event',
$queryBuilder->expr()->eq('tx_events_domain_model_date.event', $queryBuilder->quoteIdentifier('event.uid'))
)->where(
$queryBuilder->expr()->like('event.title', $queryBuilder->createNamedParameter('%' . $search . '%'))
)->orderBy('tx_events_domain_model_date.start');
return $statement->execute()->fetchAll();
}
}

View file

@ -0,0 +1,146 @@
<?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
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* 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\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
class EventRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
/**
* Find all products based on selected uids
*
* @param string $uids
*
* @return array
*/
public function findByUids($uids)
{
$uids = explode(',', $uids);
$query = $this->createQuery();
//$query->getQuerySettings()->setRespectStoragePage(false);
$query->matching(
$query->in('uid', $uids)
);
//return $this->orderByField($query->execute(), $uids);
return $query->execute();
}
/**
* @param EventDemand $demand
* @return QueryResultInterface
* @throws InvalidQueryException
*/
public function findByDemand(EventDemand $demand)
{
$query = $this->createDemandQuery($demand);
return $query->execute();
}
/**
* @param EventDemand $demand
* @return QueryInterface
* @throws InvalidQueryException
*/
protected function createDemandQuery(EventDemand $demand): QueryInterface
{
$query = $this->createQuery();
// 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 = [];
$categories = $demand->getCategories();
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->getRegion() !== '') {
$constraints['region'] = $query->equals('region', $demand->getRegion());
}
if ($demand->getHighlight()) {
$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;
}
/**
* @param QueryInterface $query
* @param string $categories
* @param bool $includeSubCategories
* @return array
* @throws InvalidQueryException
*/
protected function createCategoryConstraint(QueryInterface $query, $categories, bool $includeSubCategories = false): array
{
$constraints = [];
if ($includeSubCategories) {
$categoryService = GeneralUtility::makeInstance(CategoryService::class);
$allCategories = $categoryService->getChildrenCategories($categories);
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;
}
public function findSearchWord($search)
{
$query = $this->createQuery();
$query->matching(
$query->like('title', '%' . $search . '%')
);
$query->setOrderings(['title' => QueryInterface::ORDER_ASCENDING]);
$query->setLimit(20);
return $query->execute();
}
}

View file

@ -0,0 +1,22 @@
<?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
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
class OrganizerRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
}

View file

@ -0,0 +1,22 @@
<?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
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
class RegionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
}

View file

@ -0,0 +1,116 @@
<?php
namespace Wrm\Events\Service;
use TYPO3\CMS\Core\Cache\CacheManager;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class CategoryService
{
/** @var TimeTracker */
protected $timeTracker;
/** @var FrontendInterface */
protected $cache;
public function __construct()
{
$this->timeTracker = GeneralUtility::makeInstance(TimeTracker::class);
$this->cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_Events_category');
}
/**
* Get child categories by calling recursive function
* and using the caching framework to save some queries
*
* @param string $idList list of category ids to start
* @param int $counter
* @return string comma separated list of category ids
*/
public function getChildrenCategories($idList, int $counter = 0)
{
$cacheIdentifier = sha1('children' . $idList);
$entry = $this->cache->get($cacheIdentifier);
if (!$entry) {
$entry = $this->getChildrenCategoriesRecursive($idList, $counter);
$this->cache->set($cacheIdentifier, $entry);
}
return $entry;
}
/**
* Get child categories
*
* @param string $idList list of category ids to start
* @param int $counter
* @return string comma separated list of category ids
*/
protected function getChildrenCategoriesRecursive($idList, $counter = 0): string
{
$result = [];
// add id list to the output
if ($counter === 0) {
$newList = $this->getUidListFromRecords($idList);
if ($newList) {
$result[] = $newList;
}
}
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_category');
$res = $queryBuilder
->select('uid')
->from('sys_category')
->where(
$queryBuilder->expr()->in('parent', $queryBuilder->createNamedParameter(explode(',', $idList), Connection::PARAM_INT_ARRAY))
)
->execute();
while ($row = $res->fetch()) {
$counter++;
if ($counter > 10000) {
$this->timeTracker->setTSlogMessage('EXT:dd_events: one or more recursive categories where found');
return implode(',', $result);
}
$subcategories = $this->getChildrenCategoriesRecursive($row['uid'], $counter);
$result[] = $row['uid'] . ($subcategories ? ',' . $subcategories : '');
}
$result = implode(',', $result);
return $result;
}
/**
* Fetch ids again from DB to avoid false positives
*
* @param string $idList
* @return string
*/
protected function getUidListFromRecords(string $idList): string
{
$list = [];
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_category');
$rows = $queryBuilder
->select('uid')
->from('sys_category')
->where(
$queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter(explode(',', $idList), Connection::PARAM_INT_ARRAY))
)
->execute()
->fetchAll();
foreach ($rows as $row) {
$list[] = $row['uid'];
}
return implode(',', $list);
}
}

View file

@ -0,0 +1,131 @@
<?php
namespace Wrm\Events\Service\Cleanup;
/*
* Copyright (C) 2019 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\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Database
{
const DATE_TABLE = 'tx_events_domain_model_date';
const EVENT_TABLE = 'tx_events_domain_model_event';
const ORGANIZER_TABLE = 'tx_events_domain_model_organizer';
public function truncateTables(string ...$tableNames): void
{
foreach ($tableNames as $tableName) {
GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($tableName)
->truncate($tableName);
}
}
public function getDeletionStructureForEvents(): array
{
$dataStructure = [static::EVENT_TABLE => []];
foreach ($this->getAllRecords(static::EVENT_TABLE) as $recordToDelete) {
$dataStructure[static::EVENT_TABLE][$recordToDelete] = ['delete' => 1];
}
return $dataStructure;
}
private function getAllRecords(string $tableName): array
{
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($tableName)
->createQueryBuilder();
$records = $queryBuilder->select('uid')
->from($tableName)
->execute()
->fetchAll();
return array_map(function (array $record) {
return $record['uid'];
}, $records);
}
public function getPastDates(): array
{
$midnightToday = new \DateTimeImmutable('midnight today');
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable(static::DATE_TABLE)
->createQueryBuilder();
$queryBuilder->getRestrictions()->removeAll();
$records = $queryBuilder->select('uid')
->from(static::DATE_TABLE)
->where($queryBuilder->expr()->lte(
'end',
$queryBuilder->createNamedParameter($midnightToday->format('Y-m-d H:i:s'))
))
->execute()
->fetchAll();
return array_map(function (array $record) {
return $record['uid'];
}, $records);
}
public function deleteDates(int ...$uids)
{
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable(static::DATE_TABLE);
$queryBuilder->delete(static::DATE_TABLE)
->where('uid in (:uids)')
->setParameter(':uids', $uids, Connection::PARAM_INT_ARRAY)
->execute();
}
public function getDeletionStructureForEventsWithoutDates(): array
{
$dataStructure = [static::EVENT_TABLE => []];
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable(static::EVENT_TABLE)
->createQueryBuilder();
$queryBuilder->getRestrictions()->removeAll();
$records = $queryBuilder->select('event.uid')
->from(static::EVENT_TABLE, 'event')
->leftJoin('event', static::DATE_TABLE, 'date', $queryBuilder->expr()->eq('date.event', 'event.uid'))
->where($queryBuilder->expr()->isNull('date.uid'))
->execute()
->fetchAll();
foreach ($records as $record) {
$dataStructure[static::EVENT_TABLE][$record['uid']] = ['delete' => 1];
}
return $dataStructure;
}
}

View file

@ -0,0 +1,115 @@
<?php
namespace Wrm\Events\Service\Cleanup;
/*
* Copyright (C) 2019 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\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Resource\ResourceStorage;
use TYPO3\CMS\Core\Resource\StorageRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Files
{
public function deleteAll()
{
$this->delete($this->getFilesFromDb());
}
public function deleteDangling()
{
$this->delete($this->getFilesFromDb(function (QueryBuilder $queryBuilder) {
$queryBuilder->leftJoin(
'file',
'sys_file_reference',
'reference',
$queryBuilder->expr()->eq('file.uid', $queryBuilder->quoteIdentifier('reference.uid_local'))
);
$queryBuilder->andWhere(
$queryBuilder->expr()->orX(
$queryBuilder->expr()->isNull('reference.uid'),
$queryBuilder->expr()->eq('reference.deleted', 1),
$queryBuilder->expr()->eq('reference.hidden', 1)
)
);
}));
}
private function delete(array $filesToDelete)
{
$uidsToRemove = [];
foreach ($filesToDelete as $fileToDelete) {
$this->deleteFromFal($fileToDelete['storage'], $fileToDelete['identifier']);
$uidsToRemove[] = $fileToDelete['uid'];
}
$this->deleteFromDb(... $uidsToRemove);
}
private function getFilesFromDb(callable $whereGenerator = null): array
{
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_file');
$queryBuilder->getRestrictions()->removeAll();
$queryBuilder->select('file.identifier', 'file.storage', 'file.uid')
->from('sys_file', 'file')
->where($queryBuilder->expr()->like(
'file.identifier',
$queryBuilder->createNamedParameter('/staedte/%/events/%')
));
if ($whereGenerator !== null) {
$whereGenerator($queryBuilder);
}
return $queryBuilder->execute()->fetchAll();
}
private function deleteFromFal(int $storageUid, string $filePath)
{
/* @var ResourceStorage $storage */
$storage = GeneralUtility::makeInstance(StorageRepository::class)
->findByUid($storageUid);
if ($storage->hasFile($filePath) === false) {
return;
}
$storage->deleteFile($storage->getFile($filePath));
}
private function deleteFromDb(int ...$uids)
{
/* @var QueryBuilder $queryBuilder */
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_file');
$queryBuilder->delete('sys_file')
->where('uid in (:uids)')
->setParameter(':uids', $uids, Connection::PARAM_INT_ARRAY)
->execute();
}
}

View file

@ -0,0 +1,49 @@
<?php
namespace Wrm\Events\Service;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Wrm\Events\Service\Cleanup\Database;
use Wrm\Events\Service\Cleanup\Files;
class CleanupService
{
/**
* @var Database
*/
private $database;
/**
* @var Files
*/
private $files;
public function __construct(Database $database, Files $files)
{
$this->database = $database;
$this->files = $files;
}
public function deleteAllData()
{
$this->database->truncateTables(... [Database::DATE_TABLE, Database::ORGANIZER_TABLE]);
$this->removeViaDataHandler($this->database->getDeletionStructureForEvents());
$this->files->deleteAll();
}
public function deletePastData()
{
$this->database->deleteDates(... $this->database->getPastDates());
$this->removeViaDataHandler($this->database->getDeletionStructureForEventsWithoutDates());
$this->files->deleteDangling();
}
private function removeViaDataHandler(array $structure)
{
/* @var DataHandler $dataHandler */
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
$dataHandler->start([], $structure);
$dataHandler->process_cmdmap();
}
}

View file

@ -0,0 +1,768 @@
<?php
namespace Wrm\Events\Service;
use TYPO3\CMS\Core\Core\Environment;
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\Object\ObjectManager;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
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 {
/**
* @var
*/
protected $restUrl;
/**
* @var
*/
protected $restLicenseKey;
/**
* @var
*/
protected $restType;
/**
* @var
*/
protected $restLimit;
/**
* @var
*/
protected $restMode;
/**
* @var
*/
protected $restTemplate;
/**
* @var
*/
protected $restExperience;
/**
* @var
*/
protected $storagePid;
/**
* @var
*/
protected $categoriesPid;
/**
* @var
*/
protected $regionUid;
/**
* @var
*/
protected $categoryParentUid;
/**
* @var
*/
protected $filesFolder;
/**
* @var
*/
protected $storage;
/**
* @var array
*/
protected $settings = [];
/*
* @var
*/
protected $environment;
/**
* @var
*/
protected $tmpCurrentEvent;
/**
* @var
*/
protected $logger;
/**
* @var EventRepository
*/
protected $eventRepository;
/**
* @var RegionRepository
*/
protected $regionRepository;
/**
* @var OrganizerRepository
*/
protected $organizerRepository;
/**
* @var DateRepository
*/
protected $dateRepository;
/**
* @var CategoryRepository
*/
protected $sysCategoriesRepository;
/**
* @var FileRepository
*/
protected $fileRepository;
/**
* @var MetaDataRepository
*/
protected $metaDataRepository;
/**
* @var ConfigurationManager
*/
protected $configurationManager;
/**
* @var ObjectManager
*/
protected $objectManager;
/**
* @var PersistenceManager
*/
protected $persistenceManager;
/**
* @var ResourceFactory
*/
protected $resourceFactory;
/**
* ImportService constructor.
* @param EventRepository $eventRepository
* @param RegionRepository $regionRepository
* @param OrganizerRepository $organizerRepository
* @param DateRepository $dateRepository
* @param CategoryRepository $sysCategoriesRepository
* @param FileRepository $fileRepository
* @param MetaDataRepository $metaDataRepository
* @param ConfigurationManager $configurationManager
* @param PersistenceManager $persistenceManager
* @param ResourceFactory $resourceFactory
* @param ObjectManager $objectManager
* @param Environment $environment
*/
public function __construct(
EventRepository $eventRepository,
RegionRepository $regionRepository,
OrganizerRepository $organizerRepository,
DateRepository $dateRepository,
CategoryRepository $sysCategoriesRepository,
FileRepository $fileRepository,
MetaDataRepository $metaDataRepository,
ConfigurationManager $configurationManager,
PersistenceManager $persistenceManager,
ResourceFactory $resourceFactory,
ObjectManager $objectManager,
Environment $environment
) {
$this->eventRepository = $eventRepository;
$this->regionRepository = $regionRepository;
$this->organizerRepository = $organizerRepository;
$this->dateRepository = $dateRepository;
$this->sysCategoriesRepository = $sysCategoriesRepository;
$this->fileRepository = $fileRepository;
$this->metaDataRepository = $metaDataRepository;
$this->configurationManager = $configurationManager;
$this->persistenceManager = $persistenceManager;
$this->resourceFactory = $resourceFactory;
$this->objectManager = $objectManager;
$this->environment = $environment;
// Get Typoscript Settings
$this->settings = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS,
'Events',
'Pi1'
);
// Set properties
$this->restUrl = $this->settings['destinationData']['restUrl'];
$this->restLicenseKey = $this->settings['destinationData']['license'];
$this->restType = $this->settings['destinationData']['restType'];
$this->restLimit = $this->settings['destinationData']['restLimit'];
$this->restMode = $this->settings['destinationData']['restMode'];
$this->restTemplate = $this->settings['destinationData']['restTemplate'];
$this->sysCategoriesPid = $this->settings['destinationData']['categoriesPid'];
$this->categoryParentUid = $this->settings['destinationData']['categoryParentUid'];
}
/**
* @param $restExperience
* @param $storagePid
* @param $regionUid
* @param $filesFolder
*/
public function import($restExperience, $storagePid, $regionUid, $filesFolder) {
$this->restExperience = $restExperience;
$this->storagePid = $storagePid;
$this->regionUid = $regionUid;
$this->filesFolder = $filesFolder;
// Get configuration
$frameworkConfiguration = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
);
// Set storage pid
$persistenceConfiguration = [
'persistence' => [
'storagePid' => $this->storagePid,
],
];
// Set Configuration
$this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $persistenceConfiguration));
$this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Starting Destination Data Import Service');
$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)) {
$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) {
$this->logger->info('Processing json ' . count($data['items']));
// Get selected region
$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!
$this->tmpCurrentEvent = $this->getOrCreateEvent($event['global_id'], $event['title']);
// Set language UID
$this->tmpCurrentEvent->setLanguageUid(-1);
// Set selected Region
$this->tmpCurrentEvent->setRegion($selectedRegion);
// Set Title
$this->tmpCurrentEvent->setTitle(substr($event['title'], 0, 254));
// Set Highlight (Is only set in rest if true)
if($event['highlight'])
$this->tmpCurrentEvent->setHighlight($event['highlight']);
// Set 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'])
$this->setAddress($event);
// Set LatLng
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
$this->setLatLng($event['geo']['main']['latitude'], $event['geo']['main']['longitude']);
// Set Categories
if($event['categories'])
$this->setCategories($event['categories']);
// Set Organizer
if($event['addresses'])
$this->setOrganizer($event['addresses']);
// Set Social
if($event['media_objects'])
$this->setSocial($event['media_objects']);
// Set Tickets
if($event['media_objects'])
$this->setTickets($event['media_objects']);
// Set Dates
if($event['timeIntervals'])
$this->setDates($event['timeIntervals']);
// Set Assets
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');
return 0;
}
/**
*
* @param 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->setTitle($categoryTitle);
$tmpSysCategory->setParent($sysParentCategory);
$tmpSysCategory->setPid($this->sysCategoriesPid);
$this->sysCategoriesRepository->add($tmpSysCategory);
$this->tmpCurrentEvent->addCategory($tmpSysCategory);
} else {
$this->tmpCurrentEvent->addCategory($tmpSysCategory);
}
}
}
/**
* @param array $timeIntervals
* @TODO: split into functions
*/
protected function setDates(Array $timeIntervals) {
// @TODO: does not seem to work -->
//$currentEventDates = $this->tmpCurrentEvent->getDates();
//$this->tmpCurrentEvent->removeAllDates($currentEventDates);
// <--
// TODO: Workaround delete dates
$currentEventDates = $this->tmpCurrentEvent->getDates();
$this->logger->info('Found ' . count($currentEventDates) . ' to delete');
foreach ($currentEventDates as $currentDate) {
$this->dateRepository->remove($currentDate);
}
$today = new \DateTime('today');
$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);
$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'));
$this->logger->info('End transformed ' . $end->format('Y-m-d H:i'));
// Set language UID
$dateObj->setLanguageUid(-1);
$dateObj->setStart($start);
$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)) {
if ($i >= $today) {
$eventStart = new \DateTime();
$eventStart->setTimestamp($i);
$eventStart->setTime($start->format('H'), $start->format('i'));
$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->setLanguageUid(-1);
$dateObj->setStart($eventStart);
$dateObj->setEnd($eventEnd);
$this->tmpCurrentEvent->addDate($dateObj);
}
}
}
else if ($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']);
$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($day, $start->getTimestamp()); $i <= $until->getTimestamp(); $i = strtotime('+1 week', $i)) {
if ($i >= $today) {
$eventStart = new \DateTime();
$eventStart->setTimestamp($i);
$eventStart->setTime($start->format('H'), $start->format('i'));
$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->setLanguageUid(-1);
$dateObj->setStart($eventStart);
$dateObj->setEnd($eventEnd);
$this->tmpCurrentEvent->addDate($dateObj);
}
}
}
}
}
}
$this->logger->info('Finished setup dates');
}
/**
* @param array $addresses
*/
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->setLanguageUid(-1);
$tmpOrganizer->setName($address['name']);
$tmpOrganizer->setCity($address['city']);
$tmpOrganizer->setZip($address['zip']);
$tmpOrganizer->setStreet($address['street']);
$tmpOrganizer->setPhone($address['phone']);
$tmpOrganizer->setWeb($address['web']);
$tmpOrganizer->setEmail($address['email']);
$tmpOrganizer->setDistrict($address['district']);
$this->organizerRepository->add($tmpOrganizer);
$this->tmpCurrentEvent->setOrganizer($tmpOrganizer);
}
}
}
/**
* @param array $event
*/
protected function setAddress(Array $event) {
if (!empty($event['name']))
$this->tmpCurrentEvent->setName($event['name']);
if (!empty($event['street']))
$this->tmpCurrentEvent->setStreet($event['street']);
if (!empty($event['city']))
$this->tmpCurrentEvent->setCity($event['city']);
if (!empty($event['zip']))
$this->tmpCurrentEvent->setZip($event['zip']);
if (!empty($event['country']))
$this->tmpCurrentEvent->setCountry($event['country']);
if (!empty($event['phone']))
$this->tmpCurrentEvent->setPhone($event['phone']);
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)
{
if ($link['rel'] == "ticket") {
$this->tmpCurrentEvent->setTicket($link['url']);
break;
} elseif ($link['rel'] == "booking" && !$this->multi_array_key_exists('ticket', $media)) {
$this->tmpCurrentEvent->setTicket($link['url']);
break;
} elseif ($link['rel'] == "PRICE_KARTENLINK" && !$this->multi_array_key_exists('ticket', $media) && !$this->multi_array_key_exists('booking', $media)) {
$this->tmpCurrentEvent->setTicket($link['url']);
}
}
}
/**
* @param string $needle
* @param array $haystack
*/
protected function multi_array_key_exists( $needle, $haystack ) {
foreach ( $haystack as $key => $value ) {
if ( $needle == $key ) {
return true;
}
if ( is_array( $value ) ) {
if ( $this->multi_array_key_exists( $needle, $value ) == true ) {
return true;
}
}
}
return false;
}
/**
* @param string $lat
* @param string $lng
*/
protected function setLatLng(String $lat, String $lng) {
$this->tmpCurrentEvent->setLatitude($lat);
$this->tmpCurrentEvent->setLongitude($lng);
}
/**
* Set Texts
* @param Array $texts
*/
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']));
}
if ($text['rel'] == "teaser" && $text['type'] == "text/plain") {
$this->tmpCurrentEvent->setTeaser(str_replace('\n\n', '\n', $text['value']));
}
if ($text['rel'] == "PRICE_INFO" && $text['type'] == "text/plain") {
$this->tmpCurrentEvent->setPriceInfo(str_replace('\n\n', '\n', $text['value']));
}
}
}
/**
* Load File
* @param String $globalId
* @param String $title
*/
protected function getOrCreateEvent(String $globalId, String $title) {
$event = $this->eventRepository->findOneByGlobalId($globalId);
if ($event) {
// Global ID is found and events gets updated
$event = $this->eventRepository->findOneByGlobalId($globalId);
$this->logger->info('Found "' . substr($title, 0, 20) . '..." with global id ' . $globalId . ' in database');
return $event;
}
// New event is created
$this->logger->info(substr($title, 0, 20) . ' does not exist');
$event = $this->objectManager->get(\Wrm\Events\Domain\Model\Event::class);
// Create event and persist
$event->setGlobalId($globalId);
$event->setCategories(new ObjectStorage());
$this->eventRepository->add($event);
$this->persistenceManager->persistAll();
$this->logger->info('Not found "' . substr($title, 0, 20) . '..." with global id ' . $globalId . ' in database. Created new one.');
return $event;
}
/**
* @param 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") {
$this->storage = $this->resourceFactory->getDefaultStorage();
$orgFileUrl = urldecode($media_object['url']);
$orgFileNameSanitized = $this->storage->sanitizeFileName(
basename(
urldecode($media_object['url'])
)
);
$this->logger->info('File attached:' . $orgFileUrl);
$this->logger->info('File attached sanitized:' . $orgFileNameSanitized);
//die();
if ($this->storage == null) {
$this->logger->error('No default storage defined. Cancel import.');
die();
}
// Check if file already exists
if (file_exists($this->environment->getPublicPath() . '/fileadmin/' . $this->filesFolder . $orgFileNameSanitized)) {
$this->logger->info('File already exists');
} else {
$this->logger->info("File don't exist " . $orgFileNameSanitized);
// Load the file
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));
} else {
$error = true;
}
}
if ($error !== true) {
if ($this->tmpCurrentEvent->getImages() !== null) {
$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);
}
}
}
$error = false;
}
}
/**
* Load File
* @param string $file
* @return string
*/
protected function loadFile($file) {
$directory = $this->environment->getPublicPath() . "/uploads/tx_events/";
$filename = basename($file);
$this->logger->info('Getting file ' . $file . ' as ' . $filename);
$asset = GeneralUtility::getUrl($file);
if ($asset) {
file_put_contents($directory . $filename, $asset);
return $filename;
}
$this->logger->error('Cannot load file ' . $file);
return false;
}
/**
* Build relations for FAL
* @param int $uid_local
* @param string $tablenames
* @param int $uid_foreign
* @param string $fieldname
* @param string $storagePid
* @return bool
*/
protected function createFileRelations($uid_local, $tablenames, $uid_foreign, $fieldname, $storagePid) {
$newId = 'NEW1234';
$data = array();
$data['sys_file_reference'][$newId] = array(
'table_local' => 'sys_file',
'uid_local' => $uid_local,
'tablenames' => $tablenames,
'uid_foreign' => $uid_foreign,
'fieldname' => $fieldname,
'pid' => $storagePid
);
$data[$tablenames][$uid_foreign] = array(
'pid' => $storagePid,
$fieldname => $newId
);
$dataHandler = $this->objectManager->get(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
$dataHandler->start($data, array());
$dataHandler->process_datamap();
if (count($dataHandler->errorLog) === 0) {
return true;
}
foreach($dataHandler->errorLog as $error) {
$this->logger->info($error);
}
return false;
}
/**
* Performs slug update
* @return bool
*/
protected function doSlugUpdate()
{
$this->logger->info('Update slugs');
$slugHelper = GeneralUtility::makeInstance(
SlugHelper::class,
'tx_events_domain_model_event',
'slug',
$GLOBALS['TCA']['tx_events_domain_model_event']['columns']['slug']['config']
);
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tx_events_domain_model_event');
$queryBuilder = $connection->createQueryBuilder();
$queryBuilder->getRestrictions()->removeAll();
$statement = $queryBuilder->select('uid', 'global_id')
->from('tx_events_domain_model_event')
->where(
$queryBuilder->expr()->orX(
$queryBuilder->expr()->eq('slug', $queryBuilder->createNamedParameter('', \PDO::PARAM_STR)),
$queryBuilder->expr()->isNull('slug')
)
)
->execute();
while ($record = $statement->fetch()) {
$queryBuilder = $connection->createQueryBuilder();
$queryBuilder->update('tx_events_domain_model_event')
->where(
$queryBuilder->expr()->eq(
'uid',
$queryBuilder->createNamedParameter($record['uid'], \PDO::PARAM_INT)
)
)
->set('slug', $slugHelper->sanitize((string)$record['global_id']));
$queryBuilder->getSQL();
$queryBuilder->execute();
}
return true;
}
}

View file

@ -0,0 +1,9 @@
<?php
namespace Wrm\Events\ViewHelpers;
class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper {
protected function renderHiddenReferrerFields(){
return '';
}
}

View file

@ -0,0 +1,12 @@
<?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
],
];

View file

@ -0,0 +1,101 @@
#
# 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

View file

@ -0,0 +1,236 @@
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Options</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.sortByDate>
<TCEforms>
<exclude>1</exclude>
<label>Sort By</label>
<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>
<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>
<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>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.highlight>
<settings.todayOnly>
<TCEforms>
<exclude>1</exclude>
<label>Today only</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.todayOnly>
<settings.pagination>
<TCEforms>
<exclude>1</exclude>
<label>Show pagination</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.pagination>
<settings.showPID>
<TCEforms>
<exclude>1</exclude>
<label>Detail page</label>
<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>
</el>
</ROOT>
</sDEF>
<sTemplate>
<ROOT>
<TCEforms>
<sheetTitle>Template</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.template>
<exclude>1</exclude>
<label>Layout option</label>
<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 &amp; Categories</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.region>
<TCEforms>
<label>Region</label>
<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>
<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>
<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>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.includeSubcategories>
</el>
</ROOT>
</sConstrains>
</sheets>
</T3DataStructure>

View file

@ -0,0 +1,39 @@
<T3DataStructure>
<sheets>
<sSearch>
<ROOT>
<TCEforms>
<sheetTitle>Options</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.pageUid>
<TCEforms>
<exclude>1</exclude>
<label>Results page</label>
<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.pageUid>
<settings.showRegions>
<TCEforms>
<exclude>1</exclude>
<label>Show Regions</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.showRegions>
</el>
</ROOT>
</sSearch>
</sheets>
</T3DataStructure>

View file

@ -0,0 +1,57 @@
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Options</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.backPID>
<TCEforms>
<exclude>1</exclude>
<label>Back page</label>
<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.backPID>
</el>
</ROOT>
</sDEF>
<sTemplate>
<ROOT>
<TCEforms>
<sheetTitle>Template</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.template>
<exclude>1</exclude>
<label>Layout option</label>
<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>
</items>
<default>default</default>
</config>
</settings.template>
</el>
</ROOT>
</sTemplate>
</sheets>
</T3DataStructure>

View file

@ -0,0 +1,402 @@
<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 &amp; 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>

View file

@ -0,0 +1,72 @@
<?php
defined('TYPO3_MODE') 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',
'DateSearch',
'Events: Date Search',
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_datesearch'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'events_datesearch',
'FILE:EXT:events/Configuration/FlexForms/DateSearch.xml'
);
/* Date List Plugin */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Wrm.Events',
'DateList',
'Events: Date List',
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_datelist'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'events_datelist',
'FILE:EXT:events/Configuration/FlexForms/DateList.xml'
);
/* Date Show Plugin */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Wrm.Events',
'DateShow',
'Events: Date Show',
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_dateshow'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'events_dateshow',
'FILE:EXT:events/Configuration/FlexForms/DateShow.xml'
);
});

View file

@ -0,0 +1,17 @@
<?php
defined('TYPO3_MODE') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
'dd_events',
'tx_events_domain_model_event',
'categories',
[
'label' => 'Categories',
'fieldConfiguration' => [
'minitems' => 0,
'maxitems' => 3,
'multiple' => true,
]
]
);

View file

@ -0,0 +1,158 @@
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date',
'label' => 'start',
'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',
'starttime' => 'starttime',
'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',
],
'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'],
],
'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',
'exclude' => true,
'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_date',
'foreign_table_where' => 'AND {#tx_events_domain_model_date}.{#pid}=###CURRENT_PID### AND {#tx_events_domain_model_date}.{#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
]
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
],
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'start' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.start',
'config' => [
//'dbType' => 'datetime',
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 12,
'eval' => 'datetime',
'default' => null,
],
],
'end' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.end',
'config' => [
//'dbType' => 'datetime',
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 12,
'eval' => 'datetime',
'default' => null,
],
],
'event' => array(
'exclude' => 1,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.event',
'config' => array(
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_events_domain_model_event',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'readOnly' =>1,
)
)
],
];

View file

@ -0,0 +1,452 @@
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event',
'label' => 'title',
'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',
'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',
],
'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'],
],
'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',
'exclude' => true,
'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_event',
'foreign_table_where' => 'AND {#tx_events_domain_model_event}.{#pid}=###CURRENT_PID### AND {#tx_events_domain_model_event}.{#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
]
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
],
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.title',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'global_id' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.global_id',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'slug' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.slug',
'config' => [
'type' => 'slug',
'size' => 50,
'generatorOptions' => [
'fields' => ['title'],
'fieldSeparator' => '/',
'prefixParentPageSlug' => false,
],
'fallbackCharacter' => '-',
'eval' => 'uniqueInSite',
'default' => '',
],
],
'highlight' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.highlight',
'config' => [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
]
],
'default' => 0,
]
],
'teaser' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.teaser',
'config' => [
'type' => 'text',
'cols' => 40,
'rows' => 15,
'eval' => 'trim'
]
],
'details' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.details',
'config' => [
'type' => 'text',
'enableRichtext' => true,
'richtextConfiguration' => 'default',
'fieldControl' => [
'fullScreenRichtext' => [
'disabled' => false,
],
],
'cols' => 40,
'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',
'config' => [
'type' => 'text',
'cols' => 40,
'rows' => 15,
'eval' => 'trim'
]
],
'name' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.name',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'street' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.street',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'district' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.district',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'city' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.city',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'zip' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.zip',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'country' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.country',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'phone' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.phone',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'web' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.web',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'ticket' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.ticket',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'facebook' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.facebook',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'youtube' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.youtube',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'instagram' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.instagram',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'latitude' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.latitude',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'longitude' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.longitude',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'images' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf: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',
'showPossibleLocalizationRecords' => true,
'showRemovedLocalizationRecords' => true,
'showAllLocalizationLink' => true,
'showSynchronizationLink' => true,
],
'foreign_match_fields' => [
'fieldname' => 'images',
'tablenames' => 'tx_events_domain_model_event',
'table_local' => 'sys_file',
],
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf: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--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf: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--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf: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--;;filePalette'
]
],
'maxitems' => 1
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'categories' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.categories',
'config' => [
'type' => 'input',
'size' => 4,
'eval' => 'int'
]
],
'dates' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.dates',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_events_domain_model_date',
'foreign_field' => 'event',
'maxitems' => 9999,
'appearance' => [
'collapseAll' => 1,
'useSortable' => 0,
'expandSingle' => 1,
'enabledControls' => array(
'info' => false,
'new' => false,
'dragdrop' => false,
'sort' => false,
'hide' => false,
'delete' => false,
'localize' => false,
),
'levelLinksPosition' => 'top',
'showPossibleLocalizationRecords' => false,
'showRemovedLocalizationRecords' => false,
'showSynchronizationLink' => false,
'showAllLocalizationLink' => false,
],
],
],
'organizer' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.organizer',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_events_domain_model_organizer',
'minitems' => 0,
'maxitems' => 1,
],
],
'region' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event.region',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_events_domain_model_region',
'minitems' => 0,
'maxitems' => 1,
],
],
],
];

View file

@ -0,0 +1,193 @@
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer',
'label' => 'name',
'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',
'starttime' => 'starttime',
'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',
],
'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'],
],
'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',
'exclude' => true,
'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_organizer',
'foreign_table_where' => 'AND {#tx_events_domain_model_organizer}.{#pid}=###CURRENT_PID### AND {#tx_events_domain_model_organizer}.{#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
]
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
],
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'name' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.name',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'street' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.street',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'district' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.district',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'city' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.city',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'zip' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.zip',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'phone' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.phone',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'web' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.web',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'email' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_organizer.xlf:tx_events_domain_model_organizer.email',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
],
];

View file

@ -0,0 +1,130 @@
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_region.xlf:tx_events_domain_model_region',
'label' => 'title',
'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',
'starttime' => 'starttime',
'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',
],
'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'],
],
'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',
'exclude' => true,
'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_region',
'foreign_table_where' => 'AND {#tx_events_domain_model_region}.{#pid}=###CURRENT_PID### AND {#tx_events_domain_model_region}.{#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
]
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
],
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_region.xlf:tx_events_domain_model_region.title',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
],
];

View file

@ -0,0 +1,37 @@
plugin.tx_events {
view {
# cat=plugin.tx_events/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:events/Resources/Private/Templates/
# cat=plugin.tx_events/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:events/Resources/Private/Partials/
# cat=plugin.tx_events/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:events/Resources/Private/Layouts/
}
persistence {
# cat=plugin.tx_events//a; type=string; label=Default storage PID
storagePid =
}
settings {
# cat=plugin.tx_events//a; type=string; label=Default Image
defaultImagePath = typo3conf/ext/events/Resources/Public/Images/default.jpg
destinationData {
# cat=plugin.tx_events//a; type=string; label=Rest Url
restUrl = http://meta.et4.de/rest.ashx/search/
# cat=plugin.tx_events//a; type=string; label=License
license = ***REMOVED***
# cat=plugin.tx_events//a; type=string; label=Data Type
restType = Event
# cat=plugin.tx_events//a; type=string; label=Data Limit
restLimit = 500
# cat=plugin.tx_events//a; type=string; label=Mode
restMode = next_months,12
# cat=plugin.tx_events//a; type=string; label=Data Template
restTemplate = ET2014A.json
# cat=plugin.tx_events//a; type=string; Label=Category Storage
categoriesPid = 54
# cat=plugin.tx_events//a; type=string; Label=Category Parent ID
categoryParentUid = 6
}
}
}

View file

@ -0,0 +1,62 @@
plugin.tx_events {
view {
templateRootPaths {
0 = EXT:events/Resources/Private/Templates/
1 = {$plugin.tx_events.view.templateRootPath}
}
partialRootPaths {
0 = EXT:events/Resources/Private/Partials/
1 = {$plugin.tx_events.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:events/Resources/Private/Layouts/
1 = {$plugin.tx_events.view.layoutRootPath}
}
widget {
TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper {
templateRootPath = {$plugin.tx_events.view.templateRootPath}
}
}
}
persistence {
storagePid = {$plugin.tx_events.persistence.storagePid}
recursive = 1
}
features {
#skipDefaultArguments = 1
# if set to 1, the enable fields are ignored in BE context
ignoreAllEnableFieldsInBe = 0
# Should be on by default, but can be disabled if all action in the plugin are uncached
requireCHashArgumentForActionArguments = 0
}
mvc {
#callDefaultActionIfActionCantBeResolved = 1
}
settings {
defaulDetailEventsPid =
defaultDetailDatesPid =
defaultImagePath = {$plugin.tx_events.settings.defaultImagePath}
paginate {
# can be overriden by plugin
itemsPerPage = 10
insertAbove = 0
insertBelow = 1
maximumNumberOfLinks = 10
}
destinationData {
restUrl = {$plugin.tx_events.settings.destinationData.restUrl}
license = {$plugin.tx_events.settings.destinationData.license}
restType = {$plugin.tx_events.settings.destinationData.restType}
restLimit = {$plugin.tx_events.settings.destinationData.restLimit}
restMode = {$plugin.tx_events.settings.destinationData.restMode}
restTemplate = {$plugin.tx_events.settings.destinationData.restTemplate}
categoriesPid = {$plugin.tx_events.settings.destinationData.categoriesPid}
categoryParentUid = {$plugin.tx_events.settings.destinationData.categoryParentUid}
}
}
}
module.tx_events < plugin.tx_events

View file

@ -0,0 +1,82 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _admin-manual:
Administrator Manual
====================
Target group: **Administrators**
Describes how to manage the extension from an administrator point of view.
That relates to Page/User TSconfig, permissions, configuration etc.,
which administrator level users have access to.
Language should be non / semi-technical, explaining, using small examples.
.. _admin-installation:
Installation
------------
- How should the extension be installed?
- Are they dependencies to resolve?
- Is it a static template file to be included?
To install the extension, perform the following steps:
#. Go to the Extension Manager
#. Install the extension
#. Load the static template
#. ...
For a list of configuration options, using a definition list is recommended:
Some Configuration
This option enables...
Other configuration
This other option is for all the rest...
.. figure:: ../Images/AdministratorManual/ExtensionManager.png
:alt: Extension Manager
Extension Manager (caption of the image)
List of extensions within the Extension Manager also shorten with "EM" (legend of the image)
.. _admin-configuration:
Configuration
-------------
* Where and how the extension should be configured? TypoScript? PHP?
* Are there other prerequisite to full fill beforehand?
For example, configure a setting in a special way somewhere.
.. _admin-faq:
FAQ
---
Possible subsection: FAQ
Subsection
^^^^^^^^^^
Some subsection
Sub-subsection
""""""""""""""
Deeper into the structure...

View file

@ -0,0 +1,16 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _changelog:
ChangeLog
=========
Providing a change log chapter is optional. You can also refer
users to the ChangeLog file inside the extension or to some repository's
commit listing.

View file

@ -0,0 +1,106 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _configuration:
Configuration Reference
=======================
Technical information: Installation, Reference of TypoScript options,
configuration options on system level, how to extend it, the technical
details, how to debug it and so on.
Language should be technical, assuming developer knowledge of TYPO3.
Small examples/visuals are always encouraged.
Target group: **Developers**
.. _configuration-typoscript:
TypoScript Reference
--------------------
Possible subsections: Reference of TypoScript options.
The construct below show the recommended structure for
TypoScript properties listing and description.
Properties should be listed in the order in which they
are executed by your extension, but the first should be
alphabetical for easier access.
When detailing data types or standard TypoScript
features, don't hesitate to cross-link to the TypoScript
Reference as shown below. See the :file:`Settings.yml`
file for the declaration of cross-linking keys.
Properties
^^^^^^^^^^
.. container:: ts-properties
=========================== ===================================== ======================= ====================
Property Data type :ref:`t3tsref:stdwrap` Default
=========================== ===================================== ======================= ====================
allWrap_ :ref:`t3tsref:data-type-wrap` yes :code:`<div>|</div>`
`subst\_elementUid`_ :ref:`t3tsref:data-type-boolean` no 0
wrapItemAndSub_ :ref:`t3tsref:data-type-wrap`
=========================== ===================================== ======================= ====================
Property details
^^^^^^^^^^^^^^^^
.. only:: html
.. contents::
:local:
:depth: 1
.. _ts-plugin-tx-extensionkey-stdwrap:
allWrap
"""""""
:typoscript:`plugin.tx_extensionkey.allWrap =` :ref:`t3tsref:data-type-wrap`
Wraps the whole item.
.. _ts-plugin-tx-extensionkey-wrapitemandsub:
wrapItemAndSub
""""""""""""""
:typoscript:`plugin.tx_extensionkey.wrapItemAndSub =` :ref:`t3tsref:data-type-wrap`
Wraps the whole item and any submenu concatenated to it.
.. _ts-plugin-tx-extensionkey-substelementUid:
subst_elementUid
""""""""""""""""
:typoscript:`plugin.tx_extensionkey.subst_elementUid =` :ref:`t3tsref:data-type-boolean`
If set, all appearances of the string ``{elementUid}`` in the total
element html-code (after wrapped in allWrap_) are substituted with the
uid number of the menu item. This is useful if you want to insert an
identification code in the HTML in order to manipulate properties with
JavaScript.
.. _configuration-faq:
FAQ
---
Possible subsection: FAQ

View file

@ -0,0 +1,60 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _developer:
Developer Corner
================
Target group: **Developers**
Use this section for *providing code examples* or any **useful** information code wise.
.. _developer-hooks:
Hooks
-----
Possible hook examples. Input parameters are:
+----------------+---------------+---------------------------------+
| Parameter | Data type | Description |
+================+===============+=================================+
| $table | string | Name of the table |
+----------------+---------------+---------------------------------+
| $field | string | Name of the field |
+----------------+---------------+---------------------------------+
Use parameter :code:`$table` to retrieve the table name...
.. _developer-api:
API
---
How to use the API...
.. code-block:: php
$stuff = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'\\Foo\\Bar\\Utility\\Stuff'
);
$stuff->do();
or some other language:
.. code-block:: javascript
:linenos:
:emphasize-lines: 2-4
$(document).ready(
function () {
doStuff();
}
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

View file

@ -0,0 +1,21 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. This is 'Includes.txt'. It is included at the very top of each and
every ReST source file in this documentation project (= manual).
.. ==================================================
.. DEFINE SOME TEXT ROLES
.. --------------------------------------------------
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: php(code)
.. highlight:: php

64
Documentation/Index.rst Normal file
View file

@ -0,0 +1,64 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: Includes.txt
.. _start:
=============================================================
DD Events
=============================================================
.. only:: html
:Classification:
dd_events
:Version:
|release|
:Language:
en
:Description:
Extension to manage Destination Data managed events
:Keywords:
comma,separated,list,of,keywords
:Copyright:
2019
:Author:
Dirk Koritnik
:Email:
koritnik@werkraum-media.de
:License:
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
:Rendered:
|today|
The content of this document is related to TYPO3,
a GNU/GPL CMS/Framework available from `www.typo3.org <http://www.typo3.org/>`_.
**Table of Contents**
.. toctree::
:maxdepth: 3
:titlesonly:
Introduction/Index
User/Index
Administrator/Index
Configuration/Index
Developer/Index
KnownProblems/Index
ToDoList/Index
ChangeLog/Index
Links

View file

@ -0,0 +1,46 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _introduction:
Introduction
============
.. _what-it-does:
What does it do?
----------------
This chapter should give a brief overview of the extension. What does it do? What problems does it solve?
Who is interested in this? Basically, this section includes everything people need to know to decide whether they
should go on with this extension or not.
.. important::
Please don't forget to repeat your extension's version number in the
:file:`Settings.yml` file, in the :code:`release` property. It will be
automatically picked up on the cover page by the :code:`|release|`
substitution.
.. _screenshots:
Screenshots
-----------
This chapter should help people figure how the extension works. Remove it
if not relevant.
.. figure:: ../Images/IntroductionPackage.png
:width: 500px
:alt: Introduction Package
Introduction Package just after installation (caption of the image)
How the Frontend of the Introduction Package looks like just after installation (legend of the image)

View file

@ -0,0 +1,17 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _known-problems:
Known Problems
==============
Say where bugs can be reported / followed up. Is it a
`bug tracker <http://forge.typo3.org/projects/typo3cms-doc-official-extension-template/issues>`_?
Use this section for informing about any type of of problem
that are not necessarily named in the bug tracker such as performance issues, ...

24
Documentation/Links.rst Normal file
View file

@ -0,0 +1,24 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: Includes.txt
.. _links:
Links
-----
:TER:
https://typo3.org/extensions/repository/view/<extension key>
:Bug Tracker:
https://forge.typo3.org/projects/extension-<extension key>/issues
:Git Repository:
https://github.com/<username>/<extension key>
:Contact:
`@<username> <https://twitter.com/your-username>`__

View file

@ -0,0 +1,65 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _start:
=============================================================
###PROJECT_NAME### (Deutsch)
=============================================================
.. only:: html
:Klassifikation:
extension_key
:Version:
|release|
:Sprache:
de
:Beschreibung:
Geben Sie eine Beschreibung ein.
:Schlüsselwörter:
komma-getrennte,Liste,von,Schlüsselwörtern
:Copyright:
###YEAR###
:Autor:
###AUTHOR###
:E-Mail:
author@example.com
:Lizenz:
Dieses Dokument wird unter der Open Publication License, siehe
http://www.opencontent.org/openpub/ veröffentlicht.
:Gerendert:
|today|
Der Inhalt dieses Dokuments bezieht sich auf TYPO3,
ein GNU/GPL CMS-Framework auf `www.typo3.org <https://typo3.org/>`__.
**Inhaltsverzeichnis**
.. toctree::
:maxdepth: 3
:titlesonly:
.. Introduction/Index
.. UserManual/Index
.. AdministratorManual/Index
.. Configuration/Index
.. DeveloperCorner/Index
.. KnownProblems/Index
.. ToDoList/Index
.. ChangeLog/Index

View file

@ -0,0 +1,24 @@
How to translate
================
This directory contains the German translation of your documentation.
This is a complete Sphinx project but you may reuse assets from the
main documentation under Documentation/.
If you plan to translate your documentation to German, you should
rename this directory and remove the suffix ".tmpl":
Localization.de_DE.tmpl -> Localization.de_DE
As this file is not needed either, feel free to delete it as well.
Supported languages
===================
Please visit http://sphinx-doc.org/latest/config.html#intl-options for a
list of languages supported by Sphinx.
Please note however that TYPO3 is using locales so you may need to
extend the language code from Sphinx into a proper locale to be used
by TYPO3.

View file

@ -0,0 +1,29 @@
# This is the project specific Settings.yml file.
# Place Sphinx specific build information here.
# Settings given here will replace the settings of 'conf.py'.
# Below is an example of intersphinx mapping declaration
# Add more mappings depending on what manual you want to link to
# Remove entirely if you don't need cross-linking
---
conf.py:
copyright: 2012-2015
project: Extension Name (Deutsch)
version: x.y
release: x.y.z
intersphinx_mapping:
t3tsref:
- https://docs.typo3.org/typo3cms/TyposcriptReference/
- null
latex_documents:
- - Index
- <extension_key>.tex
- Extension Name (Français)
- Your Name
- manual
latex_elements:
papersize: a4paper
pointsize: 10pt
preamble: \usepackage{typo3}
...

View file

@ -0,0 +1,65 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _start:
=============================================================
###PROJECT_NAME### (Français)
=============================================================
.. only:: html
:Classification:
extension_key
:Version:
|release|
:Langue:
fr
:Description:
entrez une description.
:Mots-clés:
list,mots-clés,séparés,par,virgules
:Copyright:
###YEAR###
:Auteur:
###AUTHOR###
:E-mail:
author@example.com
:Licence:
Ce document est publié sous la licence de publication libre
disponible sur http://www.opencontent.org/openpub/
:Généré:
|today|
Le contenu de ce document est en relation avec TYPO3,
un CMS/Framework GNU/GPL disponible sur `www.typo3.org <https://typo3.org/>`__.
**Sommaire**
.. toctree::
:maxdepth: 3
:titlesonly:
.. Introduction/Index
.. UserManual/Index
.. AdministratorManual/Index
.. Configuration/Index
.. DeveloperCorner/Index
.. KnownProblems/Index
.. ToDoList/Index
.. ChangeLog/Index

View file

@ -0,0 +1,24 @@
How to translate
================
This directory contains the French translation of your documentation.
This is a complete Sphinx project but you may reuse assets from the
main documentation under Documentation/.
If you plan to translate your documentation to French, you should
rename this directory and remove the suffix ".tmpl":
Localization.fr_FR.tmpl -> Localization.fr_FR
As this file is not needed either, feel free to delete it as well.
Supported languages
===================
Please visit http://sphinx-doc.org/latest/config.html#intl-options for a
list of languages supported by Sphinx.
Please note however that TYPO3 is using locales so you may need to
extend the language code from Sphinx into a proper locale to be used
by TYPO3.

View file

@ -0,0 +1,29 @@
# This is the project specific Settings.yml file.
# Place Sphinx specific build information here.
# Settings given here will replace the settings of 'conf.py'.
# Below is an example of intersphinx mapping declaration
# Add more mappings depending on what manual you want to link to
# Remove entirely if you don't need cross-linking
---
conf.py:
copyright: 2012-2015
project: Extension Name (Français)
version: x.y
release: x.y.z
intersphinx_mapping:
t3tsref:
- https://docs.typo3.org/typo3cms/TyposcriptReference/
- null
latex_documents:
- - Index
- <extension_key>.tex
- Extension Name (Français)
- Your Name
- manual
latex_elements:
papersize: a4paper
pointsize: 10pt
preamble: \usepackage{typo3}
...

View file

@ -0,0 +1,32 @@
# This is the project specific Settings.yml file.
# Place Sphinx specific build information here.
# Settings given here will replace the settings of 'conf.py'.
# Below is an example of intersphinx mapping declaration
# Add more mappings depending on what manual you want to link to
# Remove entirely if you don't need cross-linking
---
conf.py:
copyright: 2019
project: DD Events
version: 1.0.0
release: 1.0.0
intersphinx_mapping:
t3tsref:
- http://docs.typo3.org/typo3cms/TyposcriptReference/
- null
latex_documents:
- - Index
- dd_events.tex
- DD Events
- Dirk Koritnik
- manual
latex_elements:
papersize: a4paper
pointsize: 10pt
preamble: \usepackage
html_theme_options:
github_repository: TYPO3-Documentation/TYPO3CMS-Example-ExtensionManual
github_branch: latest
...

View file

@ -0,0 +1,16 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _todo:
To-Do list
==========
Give a link pointing to a `roadmap <http://forge.typo3.org/projects/typo3cms-doc-official-extension-template/roadmap>`_.
Alternatively, you can dress up a list of things you want to add or fix in this chapter
or give a vision about where the extension is heading.

View file

@ -0,0 +1,67 @@
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _user-manual:
Users Manual
============
Target group: **Editors**
Here should be described how to use the extension from the editor perspective.
- How does it work?
- works well when doing this.
- does not work so well when doing that
but we can live with it.
- **mind indentation when nesting lists**.
- How to install the plugin on a web page?
- What options are available?
Language should be non-technical, explaining, using small examples.
Don't use to many acronyms unless they have been explained.
Don't be confusing by putting information targeting administrators.
.. tip::
Take a break from time to time.
Admonitions should be used to warn the users about potential
pitfalls, attract their attention to important elements
or just add some notes for for information (further reading,
for example).
.. important::
Remember to always say "please" when asking your software to
do something.
Provide screenshots as needed for making things clear. When creating
screenshots, try using the `Introduction Package <http://demo.typo3.org/>`_
as a neutral TYPO3 CMS instance.
.. figure:: ../Images/UserManual/BackendView.png
:width: 500px
:alt: Backend view
Default Backend view (caption of the image)
The Backend view of TYPO3 after the user has clicked on module "Page". (legend of the image)
.. _user-faq:
FAQ
---
Possible subsection: FAQ

638
ExtensionBuilder.json Normal file
View file

@ -0,0 +1,638 @@
{
"modules": [
{
"config": {
"position": [
830,
5
]
},
"name": "New Model Object",
"value": {
"actionGroup": {
"_default0_list": true,
"_default1_show": true,
"_default2_new_create": false,
"_default3_edit_update": false,
"_default4_delete": false,
"customActions": [
"teaser"
]
},
"name": "Event",
"objectsettings": {
"addDeletedField": true,
"addHiddenField": true,
"addStarttimeEndtimeFields": true,
"aggregateRoot": false,
"categorizable": false,
"description": "",
"mapToTable": "",
"parentClass": "",
"sorting": false,
"type": "Entity",
"uid": "109921408756"
},
"propertyGroup": {
"properties": [
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "title",
"propertyType": "Text",
"uid": "102409777447"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "globalId",
"propertyType": "String",
"uid": "1312474499176"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "slug",
"propertyType": "String",
"uid": "1365923328864"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "highlight",
"propertyType": "Boolean",
"uid": "702208098957"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "teaser",
"propertyType": "Text",
"uid": "1507172184308"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "details",
"propertyType": "RichText",
"uid": "314424153167"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "priceInfo",
"propertyType": "Text",
"uid": "448596702496"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "street",
"propertyType": "String",
"uid": "517245651530"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "district",
"propertyType": "String",
"uid": "701548922501"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "city",
"propertyType": "String",
"uid": "565150091343"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "zip",
"propertyType": "String",
"uid": "1052357865101"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "country",
"propertyType": "String",
"uid": "437952486493"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "web",
"propertyType": "String",
"uid": "886851132875"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "booking",
"propertyType": "String",
"uid": "1258790658884"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "ticket",
"propertyType": "String",
"uid": "832122856559"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "facebook",
"propertyType": "String",
"uid": "1386671701366"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "youtube",
"propertyType": "String",
"uid": "1246060567520"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "latitude",
"propertyType": "String",
"uid": "1312904595125"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "longitude",
"propertyType": "String",
"uid": "671898304575"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "images",
"propertyType": "Image",
"uid": "259140197650"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "categories",
"propertyType": "Integer",
"uid": "677483446855"
}
]
},
"relationGroup": {
"relations": [
{
"foreignRelationClass": "",
"lazyLoading": false,
"propertyIsExcludeField": true,
"relationDescription": "",
"relationName": "dates",
"relationType": "zeroToMany",
"relationWire": "[wired]",
"renderType": "inline",
"uid": "120463841009"
},
{
"foreignRelationClass": "",
"lazyLoading": false,
"propertyIsExcludeField": true,
"relationDescription": "",
"relationName": "organizer",
"relationType": "manyToOne",
"relationWire": "[wired]",
"renderType": "selectSingle",
"uid": "272437572533"
},
{
"foreignRelationClass": "",
"lazyLoading": false,
"propertyIsExcludeField": true,
"relationDescription": "",
"relationName": "region",
"relationType": "manyToOne",
"relationWire": "[wired]",
"renderType": "selectSingle",
"uid": "1093126928530"
}
]
}
}
},
{
"config": {
"position": [
315,
132
]
},
"name": "New Model Object",
"value": {
"actionGroup": {
"_default0_list": false,
"_default1_show": false,
"_default2_new_create": false,
"_default3_edit_update": false,
"_default4_delete": false,
"customActions": []
},
"name": "Organizer",
"objectsettings": {
"addDeletedField": true,
"addHiddenField": true,
"addStarttimeEndtimeFields": true,
"aggregateRoot": false,
"categorizable": false,
"description": "",
"mapToTable": "",
"parentClass": "",
"sorting": false,
"type": "Entity",
"uid": "853312122030"
},
"propertyGroup": {
"properties": [
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "name",
"propertyType": "String",
"uid": "1039029201328"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "street",
"propertyType": "String",
"uid": "332930486259"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "district",
"propertyType": "String",
"uid": "1300937445752"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "city",
"propertyType": "String",
"uid": "114683887277"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "zip",
"propertyType": "String",
"uid": "390187572664"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "phone",
"propertyType": "String",
"uid": "16157077259"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "web",
"propertyType": "String",
"uid": "106668624565"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "email",
"propertyType": "String",
"uid": "837795943910"
}
]
},
"relationGroup": {
"relations": []
}
}
},
{
"config": {
"position": [
318,
376
]
},
"name": "New Model Object",
"value": {
"actionGroup": {
"_default0_list": true,
"_default1_show": true,
"_default2_new_create": false,
"_default3_edit_update": false,
"_default4_delete": false,
"customActions": [
"teaser"
]
},
"name": "Date",
"objectsettings": {
"addDeletedField": true,
"addHiddenField": true,
"addStarttimeEndtimeFields": true,
"aggregateRoot": false,
"categorizable": false,
"description": "",
"mapToTable": "",
"parentClass": "",
"sorting": false,
"type": "Entity",
"uid": "19849981223"
},
"propertyGroup": {
"properties": [
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "start",
"propertyType": "NativeDateTime",
"uid": "1175274648657"
},
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "end",
"propertyType": "NativeDateTime",
"uid": "119149519780"
}
]
},
"relationGroup": {
"relations": []
}
}
},
{
"config": {
"position": [
315,
613
]
},
"name": "New Model Object",
"value": {
"actionGroup": {
"_default0_list": false,
"_default1_show": false,
"_default2_new_create": false,
"_default3_edit_update": false,
"_default4_delete": false,
"customActions": []
},
"name": "Region",
"objectsettings": {
"addDeletedField": true,
"addHiddenField": true,
"addStarttimeEndtimeFields": true,
"aggregateRoot": false,
"categorizable": false,
"description": "",
"mapToTable": "",
"parentClass": "",
"sorting": false,
"type": "Entity",
"uid": "425722520612"
},
"propertyGroup": {
"properties": [
{
"allowedFileTypes": "",
"maxItems": "1",
"propertyDescription": "",
"propertyIsExcludeField": true,
"propertyIsL10nModeExclude": false,
"propertyIsRequired": false,
"propertyName": "title",
"propertyType": "String",
"uid": "1316430837945"
}
]
},
"relationGroup": {
"relations": []
}
}
}
],
"properties": {
"backendModules": [],
"description": "Extension to manage Destination Data managed events",
"emConf": {
"category": "plugin",
"custom_category": "",
"dependsOn": "typo3 => 9.5.0-9.5.99\n",
"disableLocalization": false,
"disableVersioning": false,
"skipGenerateDocumentationTemplate": false,
"sourceLanguage": "en",
"state": "alpha",
"targetVersion": "9.5.0-9.5.99",
"version": "1.0.0"
},
"extensionKey": "dd_events",
"name": "DD Events",
"originalExtensionKey": "dd_events",
"originalVendorName": "Wrm",
"persons": [
{
"company": "",
"email": "koritnik@werkraum-media.de",
"name": "Dirk Koritnik",
"role": "Developer"
}
],
"plugins": [
{
"actions": {
"controllerActionCombinations": "Event=>teaser, list, show\nDate=>teaser, list, show",
"noncacheableActions": "Event=>teaser, list, show\nDate=>teaser, list, show",
"switchableActions": "Display Events\nEvent=>teaser; Event=>list; Event=>show\nDisplay Dates\nDate=>teaser; Date=>list; Date=>show"
},
"description": "",
"key": "ddevents",
"name": "DD Events"
}
],
"vendorName": "Wrm"
},
"wires": [
{
"src": {
"moduleId": 0,
"terminal": "relationWire_0",
"uid": "120463841009"
},
"tgt": {
"moduleId": 2,
"terminal": "SOURCES",
"uid": "19849981223"
}
},
{
"src": {
"moduleId": 0,
"terminal": "relationWire_1",
"uid": "272437572533"
},
"tgt": {
"moduleId": 1,
"terminal": "SOURCES",
"uid": "853312122030"
}
},
{
"src": {
"moduleId": 0,
"terminal": "relationWire_2",
"uid": "1093126928530"
},
"tgt": {
"moduleId": 3,
"terminal": "SOURCES",
"uid": "425722520612"
}
}
],
"log": {
"last_modified": "2019-04-03 12:11",
"extension_builder_version": "9.10.0",
"be_user": "Dirk Koritnik (1)"
}
}

View file

@ -1,3 +1,19 @@
# events ### Destination Data Event Import Extension
TYPO3 extension to sync and manage events ##### Start Symfony Command to import Events local
TYPO3_CONTEXT=Development php vendor/bin/typo3 events:import
##### Start Symfony Command to import Events on Stage
TYPO3_CONTEXT=Production/Staging /usr/local/bin/php7.1.6-cli typo3cms/stage.thueringer-staedte.de/current/vendor/bin/typo3 events:import
##### Clean category relations
TRUNCATE TABLE tx_events_domain_model_event;
TRUNCATE TABLE tx_events_domain_model_date;
TRUNCATE TABLE tx_events_domain_model_organizer;
DELETE FROM sys_category_record_mm WHERE tablenames = 'tx_events_domain_model_event';
DELETE FROM sys_file_reference WHERE tablenames = 'tx_events_domain_model_event';
DELETE FROM sys_file WHERE identifier LIKE '%/events/%';
DELETE FROM sys_file_metadata WHERE alternative = 'DD Import';

View file

@ -0,0 +1,11 @@
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache >= 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

View file

@ -0,0 +1,32 @@
<?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.searchform">
<source>Search form</source>
<target>Suchformular</target>
</trans-unit>
<trans-unit id="tx_events.searchform.searchword">
<source>Search word</source>
<target>Suchwort</target>
</trans-unit>
<trans-unit id="tx_events.searchform.date_from">
<source>Date from</source>
<target>Datum von</target>
</trans-unit>
<trans-unit id="tx_events.searchform.date_to">
<source>Date to</source>
<target>Date bis</target>
</trans-unit>
<trans-unit id="tx_events.searchform.regions">
<source>All regions</source>
<target>Alle Städte</target>
</trans-unit>
<trans-unit id="tx_events.searchform.search">
<source>Search</source>
<target>Suchen</target>
</trans-unit>
</body>
</file>
</xliff>

View 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_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>
</xliff>

View file

@ -0,0 +1,128 @@
<?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>
</xliff>

View file

@ -0,0 +1,44 @@
<?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_organizer">
<source>Organizer</source>
<target>Organisator</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.name">
<source>Name</source>
<target>Name</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.street">
<source>Street</source>
<target>Straße</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.district">
<source>District</source>
<target>Bundesland</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.city">
<source>City</source>
<target>Stadt</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.zip">
<source>Zip</source>
<target>Postleitzahl</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.phone">
<source>Phone</source>
<target>Telefon</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.web">
<source>Web</source>
<target>Internet</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.email">
<source>E-Mail</source>
<target>E-Mail</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,16 @@
<?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_region">
<source>Region</source>
<target>Region</target>
</trans-unit>
<trans-unit id="tx_events_domain_model_region.title">
<source>Title</source>
<target>Titel</target>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,16 @@
<?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>
</xliff>

View file

@ -0,0 +1,26 @@
<?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.searchform">
<source>Search form</source>
</trans-unit>
<trans-unit id="tx_events.searchform.searchword">
<source>Search word</source>
</trans-unit>
<trans-unit id="tx_events.searchform.date_from">
<source>Date from</source>
</trans-unit>
<trans-unit id="tx_events.searchform.date_to">
<source>Date to</source>
</trans-unit>
<trans-unit id="tx_events.searchform.regions">
<source>All regions</source>
</trans-unit>
<trans-unit id="tx_events.searchform.search">
<source>Search</source>
</trans-unit>
</body>
</file>
</xliff>

View 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_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>
</xliff>

View file

@ -0,0 +1,95 @@
<?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>
</xliff>

View file

@ -0,0 +1,35 @@
<?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_organizer">
<source>Organizer</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.name">
<source>Name</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.street">
<source>Street</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.district">
<source>District</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.city">
<source>City</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.zip">
<source>Zip</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.phone">
<source>Phone</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.web">
<source>Web</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_organizer.email">
<source>E-Mail</source>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,14 @@
<?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_region">
<source>Region</source>
</trans-unit>
<trans-unit id="tx_events_domain_model_region.title">
<source>Title</source>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,14 @@
<?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>
</xliff>

View file

@ -0,0 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="tx-events">
<f:render section="content" />
</div>
</html>

View file

@ -0,0 +1,38 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="row">
<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: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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
<f:image src="{settings.defaultImagePath}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
<div class="caption">
<div class="caption-text mt-3">
{date.event.region.title} | <f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
<h4>{date.event.title}</h4>
<p>{date.event.teaser}</p>
<f:comment>
<!--
<f:if condition="{date.event.highlight}">
<f:then>
<b>Hightlight</b>
</f:then>
</f:if>
-->
</f:comment>
</div>
</div>
</div>
</f:for>
</div>
</html>

View file

@ -0,0 +1,57 @@
<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:for each="{paginatedDates}" as="date" iteration="index">
<div class="row mt-3 mb-3 pb-3">
<div class="col-2">
<b><f:format.date format="H:i">{date.start}</f:format.date></b><br>
<b><f:format.date format="%a">{date.start}</f:format.date></b><br>
<b><f:format.date format="d.m.">{date.start}</f:format.date></b><br>
{date.event.region.title}<br>
</div>
<div class="col-6">
<f:comment>
<!--
<f:if condition="{date.event.highlight}">
<f:then>
<b>Highlight</b>
</f:then>
</f:if>
-->
</f:comment>
<h4>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
{date.event.title}
</f:link.action>
</h4>
<p><strong>{date.event.teaser}</strong></p>
<f:format.crop maxCharacters="150">{date.event.details}</f:format.crop>
</div>
<div class="col-4">
<f:if condition="{date.event.images}">
<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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
<img src="{settings.defaultImagePath}" alt="Dummy" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
</div>
<f:if condition="{index.isLast}">
<f:then>
</f:then>
<f:else>
<div class="mb-3 border-bottom"></div>
</f:else>
</f:if>
</f:for>
</f:widget.paginate>
</html>

View file

@ -0,0 +1,14 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="row">
<div class="col-12">
<div class="p-3 mb-2 bg-light text-dark">
<f:form action="search" controller="Event" additionalAttributes="{role: 'form'}" method="get">
<div class="input-group mb-3">
<f:form.textfield name="search" value="{search}" class="form-control" />
<f:form.submit value="Search" class="btn btn-outline-secondary" />
</div>
</f:form>
</div>
</div>
</div>

View file

@ -0,0 +1,16 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<f:switch expression="{settings.template}">
<f:case value="table">
<f:render partial="Date/ListTable" arguments="{dates:dates}" />
</f:case>
<f:case value="grid">
<f:render partial="Date/ListDefault" arguments="{dates:dates}" />
</f:case>
<f:defaultCase>
<f:render partial="Date/ListDefault" arguments="{dates:dates}" />
</f:defaultCase>
</f:switch>
</f:section>
</html>

View file

@ -0,0 +1,75 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<div class="col-12 mb-5">
<f:form action="list" controller="Date" pluginName="DateList" method="get" id="events_search" name="events_search">
<div class="row">
<div class="col">
<div class="form-group">
<label for="searchword"><f:translate key="LLL:EXT:events/Resources/Private/Language/locallang.xlf:tx_events.searchform.searchword" /></label>
<f:form.textfield type="text" class="form-control" id="searchword" name="searchword" value="{searchword}" />
</div>
</div>
</div>
<f:comment><!--
<div class="row">
<div class="col">
<div class="form-group form-check">
<f:form.checkbox class="form-check-input" id="considerDate" name="considerDate" value="1" checked="{considerDate} == 1" />
<label class="form-check-label" for="considerDate">Datum berücksichtigen?</label>
</div>
</div>
</div>
--></f:comment>
<div class="row">
<div class="col col-md-6">
<div class="form-group">
<label for="start"><f:translate key="LLL:EXT:events/Resources/Private/Language/locallang.xlf:tx_events.searchform.date_from" /></label>
<div class="input-group date" id="date_start" data-target-input="nearest">
<f:form.textfield type="text" class="form-control datetimepicker-input" id="start" name="start" value="{start}" additionalAttributes="{data-target: '#date_start'}" />
<div class="input-group-append" data-target="#date_start" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<div class="col col-md-6">
<div class="form-group">
<label for="end"><f:translate key="LLL:EXT:events/Resources/Private/Language/locallang.xlf:tx_events.searchform.date_to" /></label>
<div class="input-group date" id="date_end" data-target-input="nearest">
<f:form.textfield type="text" class="form-control datetimepicker-input" id="start" name="end" value="{end}" additionalAttributes="{data-target: '#date_end'}" />
<div class="input-group-append" data-target="#date_end" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
</div>
<f:if condition="{settings.showRegions}">
<div class="row">
<div class="col-4 col-md-3 col-lg-3">
<div class="form-check">
<f:form.radio class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}==0" id="radio_0"/>
<label class="form-check-label" for="radio_0"><f:translate key="LLL:EXT:events/Resources/Private/Language/locallang.xlf:tx_events.searchform.regions" /></label>
</div>
</div>
<f:for each="{regions}" as="region">
<div class="col-3">
<div class="form-check">
<f:form.radio class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}=={region.uid}" id="radio_{region.uid}"/>
<label class="form-check-label" for="radio_{region.uid}">{region.title}</label>
</div>
</div>
</f:for>
</div>
</f:if>
<div class="form-group mt-3">
<f:form.submit value="{f:translate(key: 'LLL:EXT:events/Resources/Private/Language/locallang.xlf:tx_events.searchform.search')}" class="btn btn-primary" />
</div>
</f:form>
</div>
</div>
</f:section>
</html>

View file

@ -0,0 +1,68 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<div class="col-12 mb-5">
<!-- TODO bg color classes not loaded in scss -->
<form action="{settings.resultPID}" controller="Date" extensionName="events" method="get" addQueryString="1" id="events_search" name="events_search">
<div class="row">
<div class="col">
<div class="form-group">
<label for="searchword">Suchwort</label>
<input type="text" class="form-control" id="searchword" name="searchword" value="{searchword}" />
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="form-group">
<label for="start">Datum von</label>
<div class="input-group date" id="date_start" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" id="start" name="start" value="{start}" additionalAttributes="{data-target: '#date_start'}" />
<div class="input-group-append" data-target="#date_start" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="end">Datum bis</label>
<div class="input-group date" id="date_end" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" id="end" name="end" value="{end}" additionalAttributes="{data-target: '#date_end'}" />
<div class="input-group-append" data-target="#date_end" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<div class="form-check">
<input type="radio" class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}==0" id="radio_0"/>
<label class="form-check-label" for="radio_0">Alle Städte</label>
</div>
</div>
<f:for each="{regions}" as="region">
<div class="col-3">
<div class="form-check">
<input type="radio" class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}=={region.uid}" id="radio_{region.uid}"/>
<label class="form-check-label" for="radio_{region.uid}">{region.title}</label>
</div>
</div>
</f:for>
</div>
<div class="form-group mt-3">
<input type="submit" value="Suchen" class="btn btn-primary" />
</div>
</form>
</div>
</div>
</f:section>
</html>

View file

@ -0,0 +1,70 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<div class="col-6">
<f:if condition="{date.event.images}">
<f:then>
<f:image src="{date.event.images.originalResource.originalFile.uid}" 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"/>
</f:else>
</f:if>
</div>
<div class="col-6">
<h4>
<f:format.date format="%a">{date.start}</f:format.date>
<f:format.date format="d.m.">{date.start}</f:format.date>
<f:format.date format="H:i">{date.start}</f:format.date> Uhr
</h4>
<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">
<div class="col mt-3 mb-3">
</div>
</div>
<div class="row">
<div class="col-4">
<p><b>Preis:</b><br>
<f:if condition="{date.event.priceInfo}">
<f:then>
<f:format.nl2br>{date.event.priceInfo}</f:format.nl2br>
</f:then>
<f:else>
Keine Information
</f:else>
</f:if>
</p>
<f:if condition="{date.event.web}">
<p><b>Weitere Informationen:</b><br>
<a href="{date.event.web}" target="_blank">Website</a>
</p>
</f:if>
</div>
<div class="col-4">
<p><b>Veranstaltungsort:</b><br>
{date.event.street}<br>
{date.event.zip} {date.event.city}<br>
{date.event.phone}<br>
</p>
</div>
<div class="col-4">
<p><b>Veranstalter:</b><br>
{date.event.organizer.name}<br>
{date.event.organizer.street}<br>
{date.event.organizer.zip} {date.event.organizer.city}<br>
{date.event.organizer.phone}<br>
<a href="{date.event.organizer.web}" target="_blank">Website</a>
</p>
</div>
</div>
</f:section>
</html>

View file

@ -0,0 +1,42 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<f:for each="{dates}" as="date">
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4">
<f:comment>
<!--
<f:link.action action="show" arguments="{date : date}"></f:link.action>
-->
</f:comment>
<div class="menu-tile">
<f:if condition="{date.event.images}">
<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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
<f:image src="{settings.defaultImagePath}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
<div class="caption">
<div class="caption-text mt-3">
{date.event.region.title} | <f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
<h4>{date.event.title}</h4>
<p>{date.event.teaser}</p>
<f:if condition="{date.event.highlight}">
<f:then>
<b>Hightlight</b>
</f:then>
</f:if>
</div>
</div>
</div>
</f:for>
</div>
</f:section>
</html>

View file

@ -0,0 +1,33 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<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: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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
<f:image src="{settings.defaultImagePath}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
<div class="caption">
<div class="caption-text mt-3">
{event.region.title}
<h4>{event.title}</h4>
<p>{event.teaser}</p>
</div>
</div>
</div>
</f:for>
</div>
</f:section>
</html>

View file

@ -0,0 +1,29 @@
<f:render partial="Event/SearchForm" arguments="{search: search}"/>
<div class="row">
<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: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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
<img src="{settings.defaultImagePath}" alt="Dummy" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
<div class="caption">
<div class="caption-text mt-3">
{event.region.title}
<h4>{event.title}</h4>
<p>{event.teaser}</p>
</div>
</div>
</div>
</f:for>
</div>

View file

@ -0,0 +1,37 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<div class="col-6">
<f:if condition="{event.images}">
<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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
<img src="{settings.defaultImagePath}" alt="Dummy" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
<div class="col-6">
<h2>{event.title}</h2>
<h3>{event.teaser}</h3>
<f:format.html>{event.details}</f:format.html>
<p>{event.price_info}</p>
<div class="row">
<div class="col-4">
<p>Veranstaltungsort:<br>
{event.street}<br>
{event.zip} {event.city}<br>
</p>
</div>
</div>
</div>
</div>
</f:section>
</html>

View file

@ -0,0 +1,33 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<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: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:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Event" arguments="{event: event}">
<f:image src="{settings.defaultImagePath}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
<div class="caption">
<div class="caption-text mt-3">
{event.region.title}
<h4>{event.title}</h4>
<p>{event.teaser}</p>
</div>
</div>
</div>
</f:for>
</div>
</f:section>
</html>

View file

@ -0,0 +1,91 @@
<f:if condition="{configuration.insertAbove}">
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if>
<f:renderChildren arguments="{contentArguments}" />
<f:if condition="{configuration.insertBelow}">
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if>
<f:section name="paginator">
<nav>
<ul class="pagination">
<f:if condition="{pagination.previousPage}">
<li class="page-item">
<f:if condition="{pagination.previousPage} > 1">
<f:then>
<f:widget.link class="page-link" rel="prev"
arguments="{currentPage: pagination.previousPage}"
addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}"><span aria-hidden="true">&laquo;</span>
</f:widget.link>
</f:then>
<f:else>
<f:widget.link class="page-link" rel="prev"
addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}"><span aria-hidden="true">&laquo;</span>
</f:widget.link>
</f:else>
</f:if>
</li>
</f:if>
<f:if condition="{pagination.displayRangeStart} > 1">
<li class="page-item">
<f:widget.link class="page-link" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">1
</f:widget.link>
</li>
</f:if>
<f:if condition="{pagination.hasLessPages}">
<li class="page-item"><span class="page-link"></span></li>
</f:if>
<f:for each="{pagination.pages}" as="page">
<f:if condition="{page.isCurrent}">
<f:then>
<li class="page-item active">
<span class="page-link">{page.number}</span>
</li>
</f:then>
<f:else>
<li class="page-item">
<f:if condition="{page.number} > 1">
<f:then>
<f:widget.link class="page-link" arguments="{currentPage: page.number}"
addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">{page.number}
</f:widget.link>
</f:then>
<f:else>
<f:widget.link class="page-link"
addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">{page.number}
</f:widget.link>
</f:else>
</f:if>
</li>
</f:else>
</f:if>
</f:for>
<f:if condition="{pagination.hasMorePages}">
<li class="page-item"><span class="page-link"></span></li>
</f:if>
<f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}">
<li class="page-item">
<f:widget.link class="page-link" arguments="{currentPage: pagination.numberOfPages}"
addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">{pagination.numberOfPages}
</f:widget.link>
</li>
</f:if>
<f:if condition="{pagination.nextPage}">
<li class="page-item">
<f:widget.link class="page-link" rel="next" arguments="{currentPage: pagination.nextPage}"
addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}"><span aria-hidden="true">&raquo;</span>
</f:widget.link>
</li>
</f:if>
</ul>
</nav>
</f:section>

View file

@ -0,0 +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>

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

View file

@ -0,0 +1 @@
<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>

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,67 @@
<?php
namespace Wrm\Events\Tests\Unit\Controller;
/**
* Test case.
*
* @author Dirk Koritnik <koritnik@werkraum-media.de>
*/
class DateControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* @var \Wrm\Events\Controller\DateController
*/
protected $subject = null;
protected function setUp()
{
parent::setUp();
$this->subject = $this->getMockBuilder(\Wrm\Events\Controller\DateController::class)
->setMethods(['redirect', 'forward', 'addFlashMessage'])
->disableOriginalConstructor()
->getMock();
}
protected function tearDown()
{
parent::tearDown();
}
/**
* @test
*/
public function listActionFetchesAllDatesFromRepositoryAndAssignsThemToView()
{
$allDates = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
->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);
$view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock();
$view->expects(self::once())->method('assign')->with('dates', $allDates);
$this->inject($this->subject, 'view', $view);
$this->subject->listAction();
}
/**
* @test
*/
public function showActionAssignsTheGivenDateToView()
{
$date = new \Wrm\Events\Domain\Model\Date();
$view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock();
$this->inject($this->subject, 'view', $view);
$view->expects(self::once())->method('assign')->with('date', $date);
$this->subject->showAction($date);
}
}

View file

@ -0,0 +1,67 @@
<?php
namespace Wrm\Events\Tests\Unit\Controller;
/**
* Test case.
*
* @author Dirk Koritnik <koritnik@werkraum-media.de>
*/
class EventControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* @var \Wrm\Events\Controller\EventController
*/
protected $subject = null;
protected function setUp()
{
parent::setUp();
$this->subject = $this->getMockBuilder(\Wrm\Events\Controller\EventController::class)
->setMethods(['redirect', 'forward', 'addFlashMessage'])
->disableOriginalConstructor()
->getMock();
}
protected function tearDown()
{
parent::tearDown();
}
/**
* @test
*/
public function listActionFetchesAllEventsFromRepositoryAndAssignsThemToView()
{
$allEvents = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
->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);
$view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock();
$view->expects(self::once())->method('assign')->with('events', $allEvents);
$this->inject($this->subject, 'view', $view);
$this->subject->listAction();
}
/**
* @test
*/
public function showActionAssignsTheGivenEventToView()
{
$event = new \Wrm\Events\Domain\Model\Event();
$view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock();
$this->inject($this->subject, 'view', $view);
$view->expects(self::once())->method('assign')->with('event', $event);
$this->subject->showAction($event);
}
}

View file

@ -0,0 +1,67 @@
<?php
namespace Wrm\Events\Tests\Unit\Controller;
/**
* Test case.
*
* @author Dirk Koritnik <koritnik@werkraum-media.de>
*/
class EventsControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* @var \Wrm\Events\Controller\EventsController
*/
protected $subject = null;
protected function setUp()
{
parent::setUp();
$this->subject = $this->getMockBuilder(\Wrm\Events\Controller\EventsController::class)
->setMethods(['redirect', 'forward', 'addFlashMessage'])
->disableOriginalConstructor()
->getMock();
}
protected function tearDown()
{
parent::tearDown();
}
/**
* @test
*/
public function listActionFetchesAllEventssFromRepositoryAndAssignsThemToView()
{
$allEventss = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
->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);
$view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock();
$view->expects(self::once())->method('assign')->with('eventss', $allEventss);
$this->inject($this->subject, 'view', $view);
$this->subject->listAction();
}
/**
* @test
*/
public function showActionAssignsTheGivenEventsToView()
{
$events = new \Wrm\Events\Domain\Model\Events();
$view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock();
$this->inject($this->subject, 'view', $view);
$view->expects(self::once())->method('assign')->with('events', $events);
$this->subject->showAction($events);
}
}

View file

@ -0,0 +1,78 @@
<?php
namespace Wrm\Events\Tests\Unit\Domain\Model;
/**
* Test case.
*
* @author Dirk Koritnik <koritnik@werkraum-media.de>
*/
class DateTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* @var \Wrm\Events\Domain\Model\Date
*/
protected $subject = null;
protected function setUp()
{
parent::setUp();
$this->subject = new \Wrm\Events\Domain\Model\Date();
}
protected function tearDown()
{
parent::tearDown();
}
/**
* @test
*/
public function getStartReturnsInitialValueForDateTime()
{
self::assertEquals(
null,
$this->subject->getStart()
);
}
/**
* @test
*/
public function setStartForDateTimeSetsStart()
{
$dateTimeFixture = new \DateTime();
$this->subject->setStart($dateTimeFixture);
self::assertAttributeEquals(
$dateTimeFixture,
'start',
$this->subject
);
}
/**
* @test
*/
public function getEndReturnsInitialValueForDateTime()
{
self::assertEquals(
null,
$this->subject->getEnd()
);
}
/**
* @test
*/
public function setEndForDateTimeSetsEnd()
{
$dateTimeFixture = new \DateTime();
$this->subject->setEnd($dateTimeFixture);
self::assertAttributeEquals(
$dateTimeFixture,
'end',
$this->subject
);
}
}

View file

@ -0,0 +1,667 @@
<?php
namespace Wrm\Events\Tests\Unit\Domain\Model;
/**
* Test case.
*
* @author Dirk Koritnik <koritnik@werkraum-media.de>
*/
class EventTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{
/**
* @var \Wrm\Events\Domain\Model\Event
*/
protected $subject = null;
protected function setUp()
{
parent::setUp();
$this->subject = new \Wrm\Events\Domain\Model\Event();
}
protected function tearDown()
{
parent::tearDown();
}
/**
* @test
*/
public function getTitleReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getTitle()
);
}
/**
* @test
*/
public function setTitleForStringSetsTitle()
{
$this->subject->setTitle('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'title',
$this->subject
);
}
/**
* @test
*/
public function getGlobalIdReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getGlobalId()
);
}
/**
* @test
*/
public function setGlobalIdForStringSetsGlobalId()
{
$this->subject->setGlobalId('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'globalId',
$this->subject
);
}
/**
* @test
*/
public function getSlugReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getSlug()
);
}
/**
* @test
*/
public function setSlugForStringSetsSlug()
{
$this->subject->setSlug('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'slug',
$this->subject
);
}
/**
* @test
*/
public function getHighlightReturnsInitialValueForBool()
{
self::assertSame(
false,
$this->subject->getHighlight()
);
}
/**
* @test
*/
public function setHighlightForBoolSetsHighlight()
{
$this->subject->setHighlight(true);
self::assertAttributeEquals(
true,
'highlight',
$this->subject
);
}
/**
* @test
*/
public function getTeaserReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getTeaser()
);
}
/**
* @test
*/
public function setTeaserForStringSetsTeaser()
{
$this->subject->setTeaser('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'teaser',
$this->subject
);
}
/**
* @test
*/
public function getDetailsReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getDetails()
);
}
/**
* @test
*/
public function setDetailsForStringSetsDetails()
{
$this->subject->setDetails('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'details',
$this->subject
);
}
/**
* @test
*/
public function getPriceInfoReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getPriceInfo()
);
}
/**
* @test
*/
public function setPriceInfoForStringSetsPriceInfo()
{
$this->subject->setPriceInfo('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'priceInfo',
$this->subject
);
}
/**
* @test
*/
public function getStreetReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getStreet()
);
}
/**
* @test
*/
public function setStreetForStringSetsStreet()
{
$this->subject->setStreet('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'street',
$this->subject
);
}
/**
* @test
*/
public function getDistrictReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getDistrict()
);
}
/**
* @test
*/
public function setDistrictForStringSetsDistrict()
{
$this->subject->setDistrict('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'district',
$this->subject
);
}
/**
* @test
*/
public function getCityReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getCity()
);
}
/**
* @test
*/
public function setCityForStringSetsCity()
{
$this->subject->setCity('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'city',
$this->subject
);
}
/**
* @test
*/
public function getZipReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getZip()
);
}
/**
* @test
*/
public function setZipForStringSetsZip()
{
$this->subject->setZip('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'zip',
$this->subject
);
}
/**
* @test
*/
public function getCountryReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getCountry()
);
}
/**
* @test
*/
public function setCountryForStringSetsCountry()
{
$this->subject->setCountry('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'country',
$this->subject
);
}
/**
* @test
*/
public function getWebReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getWeb()
);
}
/**
* @test
*/
public function setWebForStringSetsWeb()
{
$this->subject->setWeb('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'web',
$this->subject
);
}
/**
* @test
*/
public function getBookingReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getBooking()
);
}
/**
* @test
*/
public function setBookingForStringSetsBooking()
{
$this->subject->setBooking('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'booking',
$this->subject
);
}
/**
* @test
*/
public function getTicketReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getTicket()
);
}
/**
* @test
*/
public function setTicketForStringSetsTicket()
{
$this->subject->setTicket('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'ticket',
$this->subject
);
}
/**
* @test
*/
public function getFacebookReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getFacebook()
);
}
/**
* @test
*/
public function setFacebookForStringSetsFacebook()
{
$this->subject->setFacebook('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'facebook',
$this->subject
);
}
/**
* @test
*/
public function getYoutubeReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getYoutube()
);
}
/**
* @test
*/
public function setYoutubeForStringSetsYoutube()
{
$this->subject->setYoutube('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'youtube',
$this->subject
);
}
/**
* @test
*/
public function getLatitudeReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getLatitude()
);
}
/**
* @test
*/
public function setLatitudeForStringSetsLatitude()
{
$this->subject->setLatitude('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'latitude',
$this->subject
);
}
/**
* @test
*/
public function getLongitudeReturnsInitialValueForString()
{
self::assertSame(
'',
$this->subject->getLongitude()
);
}
/**
* @test
*/
public function setLongitudeForStringSetsLongitude()
{
$this->subject->setLongitude('Conceived at T3CON10');
self::assertAttributeEquals(
'Conceived at T3CON10',
'longitude',
$this->subject
);
}
/**
* @test
*/
public function getImagesReturnsInitialValueForFileReference()
{
self::assertEquals(
null,
$this->subject->getImages()
);
}
/**
* @test
*/
public function setImagesForFileReferenceSetsImages()
{
$fileReferenceFixture = new \TYPO3\CMS\Extbase\Domain\Model\FileReference();
$this->subject->setImages($fileReferenceFixture);
self::assertAttributeEquals(
$fileReferenceFixture,
'images',
$this->subject
);
}
/**
* @test
*/
public function getCategoriesReturnsInitialValueForInt()
{
self::assertSame(
0,
$this->subject->getCategories()
);
}
/**
* @test
*/
public function setCategoriesForIntSetsCategories()
{
$this->subject->setCategories(12);
self::assertAttributeEquals(
12,
'categories',
$this->subject
);
}
/**
* @test
*/
public function getDatesReturnsInitialValueForDate()
{
$newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
self::assertEquals(
$newObjectStorage,
$this->subject->getDates()
);
}
/**
* @test
*/
public function setDatesForObjectStorageContainingDateSetsDates()
{
$date = new \Wrm\Events\Domain\Model\Date();
$objectStorageHoldingExactlyOneDates = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$objectStorageHoldingExactlyOneDates->attach($date);
$this->subject->setDates($objectStorageHoldingExactlyOneDates);
self::assertAttributeEquals(
$objectStorageHoldingExactlyOneDates,
'dates',
$this->subject
);
}
/**
* @test
*/
public function addDateToObjectStorageHoldingDates()
{
$date = new \Wrm\Events\Domain\Model\Date();
$datesObjectStorageMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
->setMethods(['attach'])
->disableOriginalConstructor()
->getMock();
$datesObjectStorageMock->expects(self::once())->method('attach')->with(self::equalTo($date));
$this->inject($this->subject, 'dates', $datesObjectStorageMock);
$this->subject->addDate($date);
}
/**
* @test
*/
public function removeDateFromObjectStorageHoldingDates()
{
$date = new \Wrm\Events\Domain\Model\Date();
$datesObjectStorageMock = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class)
->setMethods(['detach'])
->disableOriginalConstructor()
->getMock();
$datesObjectStorageMock->expects(self::once())->method('detach')->with(self::equalTo($date));
$this->inject($this->subject, 'dates', $datesObjectStorageMock);
$this->subject->removeDate($date);
}
/**
* @test
*/
public function getOrganizerReturnsInitialValueForOrganizer()
{
self::assertEquals(
null,
$this->subject->getOrganizer()
);
}
/**
* @test
*/
public function setOrganizerForOrganizerSetsOrganizer()
{
$organizerFixture = new \Wrm\Events\Domain\Model\Organizer();
$this->subject->setOrganizer($organizerFixture);
self::assertAttributeEquals(
$organizerFixture,
'organizer',
$this->subject
);
}
/**
* @test
*/
public function getRegionReturnsInitialValueForRegion()
{
self::assertEquals(
null,
$this->subject->getRegion()
);
}
/**
* @test
*/
public function setRegionForRegionSetsRegion()
{
$regionFixture = new \Wrm\Events\Domain\Model\Region();
$this->subject->setRegion($regionFixture);
self::assertAttributeEquals(
$regionFixture,
'region',
$this->subject
);
}
}

Some files were not shown because too many files have changed in this diff Show more