diff --git a/Classes/Command/DestinationDataImportCommand.php b/Classes/Command/DestinationDataImportCommand.php
index 734e214..af9f75b 100644
--- a/Classes/Command/DestinationDataImportCommand.php
+++ b/Classes/Command/DestinationDataImportCommand.php
@@ -23,29 +23,23 @@ class DestinationDataImportCommand extends Command {
'storage-pid',
InputArgument::OPTIONAL,
'What is the storage pid?',
- '281'
+ '284'
);
$this->addArgument(
'region-uid',
InputArgument::OPTIONAL,
'What is the region uid?',
- '3'
- );
- $this->addArgument(
- 'category-parent-uid',
- InputArgument::OPTIONAL,
- 'What is the default category parent uid?',
'6'
);
$this->addArgument('rest-experience',
InputArgument::OPTIONAL,
'What is the rest experience?',
- 'arnstadt'
+ 'stadtmarketing-erfurt'
);
$this->addArgument('files-folder',
InputArgument::OPTIONAL,
'Where to save the image files?',
- 'redaktion/arnstadt/events/'
+ 'staedte/erfurt/events/'
);
}
@@ -59,7 +53,6 @@ class DestinationDataImportCommand extends Command {
$input->getArgument('rest-experience'),
$input->getArgument('storage-pid'),
$input->getArgument('region-uid'),
- $input->getArgument('category-parent-uid'),
$input->getArgument('files-folder')
);
}
diff --git a/Classes/Controller/DateController.php b/Classes/Controller/DateController.php
index 601bb9c..7b5d5f1 100644
--- a/Classes/Controller/DateController.php
+++ b/Classes/Controller/DateController.php
@@ -1,6 +1,7 @@
createDemandFromSettings();
- $dates = $this->dateRepository->findByDemand($demand);
+ 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);
}
@@ -73,42 +83,21 @@ class DateController extends ActionController
*/
public function searchAction()
{
-
- $searchword = null;
- $regions = null;
- $selRegion = null;
- $dates = null;
- $start = null;
- $end = null;
-
- if ($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '') {
- $searchword = $this->request->getArgument('searchword');
- }
-
- if ($this->request->hasArgument('region') && $this->request->getArgument('region') != '') {
- $selRegion = $this->request->getArgument('region');
- }
-
- if ($this->request->hasArgument('start') && $this->request->getArgument('start') != '') {
- $start = date( "d.m.y", strtotime( $this->request->getArgument('start')));
- }
-
- if ($this->request->hasArgument('end') && $this->request->getArgument('end') != '') {
- $end = date( "d.m.y", strtotime( $this->request->getArgument('end')));
- }
-
- $demand = $this->createDemandFromSearch();
- $dates = $this->dateRepository->findByDemand($demand);
+ $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('regions', $regions);
$this->view->assign('selRegion', $selRegion);
- $this->view->assign('dates', $dates);
$this->view->assign('start', $start);
$this->view->assign('end', $end);
-
+ $this->view->assign('considerDate', $considerDate);
}
/**
@@ -172,13 +161,14 @@ class DateController extends ActionController
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(date( "Y-m-d", strtotime( $this->request->getArgument('start'))));
- }
+ 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(date( "Y-m-d", strtotime( $this->request->getArgument('end'))));
- }
+ 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']);
diff --git a/Classes/Domain/Model/Date.php b/Classes/Domain/Model/Date.php
index 9203b96..d56d370 100644
--- a/Classes/Domain/Model/Date.php
+++ b/Classes/Domain/Model/Date.php
@@ -49,10 +49,10 @@ class Date extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
}
/**
- * @param string $end
+ * @param \DateTime $end
* @return void
*/
- public function setEnd($end)
+ public function setEnd(\DateTime $end)
{
$this->end = $end;
}
diff --git a/Classes/Domain/Model/Dto/DateDemand.php b/Classes/Domain/Model/Dto/DateDemand.php
index 0f0a538..a1c3087 100644
--- a/Classes/Domain/Model/Dto/DateDemand.php
+++ b/Classes/Domain/Model/Dto/DateDemand.php
@@ -59,6 +59,11 @@ class DateDemand {
*/
protected $searchword = '';
+ /**
+ * @var bool
+ */
+ protected $considerDate = 0;
+
/**
* @return string
*/
@@ -235,4 +240,20 @@ class DateDemand {
$this->end = $end;
}
+ /**
+ * @return bool
+ */
+ public function getConsiderDate(): bool
+ {
+ return $this->considerDate;
+ }
+
+ /**
+ * @param bool $considerDate
+ */
+ public function setConsiderDate(string $considerDate): void
+ {
+ $this->considerDate = $considerDate;
+ }
+
}
\ No newline at end of file
diff --git a/Classes/Domain/Model/Event.php b/Classes/Domain/Model/Event.php
index d5271ef..3c95926 100644
--- a/Classes/Domain/Model/Event.php
+++ b/Classes/Domain/Model/Event.php
@@ -105,6 +105,13 @@ class Event extends AbstractEntity
*/
protected $country = '';
+ /**
+ * web
+ *
+ * @var string
+ */
+ protected $phone = '';
+
/**
* web
*
@@ -381,6 +388,22 @@ class Event extends AbstractEntity
$this->zip = $zip;
}
+ /**
+ * @return string
+ */
+ public function getPhone()
+ {
+ return $this->phone;
+ }
+
+ /**
+ * @param string $phone
+ */
+ public function setPhone($phone)
+ {
+ $this->phone = $phone;
+ }
+
/**
* @return string $web
*/
diff --git a/Classes/Domain/Repository/DateRepository.php b/Classes/Domain/Repository/DateRepository.php
index 78f080b..be63ddb 100644
--- a/Classes/Domain/Repository/DateRepository.php
+++ b/Classes/Domain/Repository/DateRepository.php
@@ -38,7 +38,7 @@ class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
// For testing purposes
// $query = $this->createDemandQueryViaBuilder($demand);
- //return $query->execute()->fetchAll();
+ // return $query->execute()->fetchAll();
}
/**
@@ -82,9 +82,12 @@ class DateRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
$constraints['daterange'] = $query->logicalAnd(
[
$query->greaterThanOrEqual('start', $demand->getStart()),
- $query->lessThanOrEqual('start', $demand->getEnd())
+ $query->lessThanOrEqual('end', $demand->getEnd())
]
);
+ } else {
+ $now = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
+ $constraints['untilnow'] = $query->greaterThanOrEqual('start', $now);
}
if ($demand->getLimit() !== '') {
diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php
index d7deb94..136dae3 100644
--- a/Classes/Service/DestinationDataImportService.php
+++ b/Classes/Service/DestinationDataImportService.php
@@ -42,6 +42,10 @@ class DestinationDataImportService {
* @var
*/
protected $restLimit;
+ /**
+ * @var
+ */
+ protected $restMode;
/**
* @var
*/
@@ -185,27 +189,27 @@ class DestinationDataImportService {
);
// 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->restTemplate = $this->settings['destinationData']['restTemplate'];
- $this->sysCategoriesPid = $this->settings['destinationData']['categoriesPid'];
+ $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 $categoryParentUid
* @param $filesFolder
*/
- public function import($restExperience, $storagePid, $regionUid, $categoryParentUid, $filesFolder) {
+ public function import($restExperience, $storagePid, $regionUid, $filesFolder) {
$this->restExperience = $restExperience;
$this->storagePid = $storagePid;
$this->regionUid = $regionUid;
- $this->categoryParentUid = $categoryParentUid;
$this->filesFolder = $filesFolder;
// Get configuration
@@ -222,16 +226,14 @@ class DestinationDataImportService {
// 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 . '&limit=' . $this->restLimit . '&template=' . $this->restTemplate;
-
+ $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');
+ $this->logger->info('Received data with ' . count($jsonResponse['items']) . ' items');
return $this->processData($jsonResponse);
} else {
$this->logger->error('Could not receive data.');
@@ -246,7 +248,9 @@ class DestinationDataImportService {
*/
public function processData($data) {
- // Get seleceted region
+ $this->logger->info('Processing json ' . count($data['items']));
+
+ // Get selected region
$selectedRegion = $this->regionRepository->findByUid($this->regionUid);
foreach ($data['items'] as $event) {
@@ -271,8 +275,9 @@ class DestinationDataImportService {
$this->setTexts($event['texts']);
// Set address and geo data
- if($event['name'] && $event['street'] && $event['city'] && $event['zip'] && $event['country'])
- $this->setAddress($event['name'], $event['street'], $event['city'], $event['zip'], $event['country']);
+
+ if($event['name'] || $event['street'] || $event['city'] || $event['zip'] || $event['country'])
+ $this->setAddress($event);
// Set LatLng
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
@@ -301,10 +306,12 @@ class DestinationDataImportService {
}
$this->doSlugUpdate();
+ $this->logger->info('Finished import');
return 0;
}
/**
+ *
* @param array $categories
*/
protected function setCategories(Array $categories) {
@@ -331,7 +338,7 @@ class DestinationDataImportService {
*/
protected function setDates(Array $timeIntervals) {
- // TODO: does not seem to work -->
+ // @TODO: does not seem to work -->
//$currentEventDates = $this->tmpCurrentEvent->getDates();
//$this->tmpCurrentEvent->removeAllDates($currentEventDates);
// <--
@@ -341,19 +348,18 @@ class DestinationDataImportService {
$this->logger->info('Found ' . count($currentEventDates) . ' to delete');
foreach ($currentEventDates as $currentDate) {
- //$this->logger->info('Delete ' . $currentDate->getStart()->format('Y-m-d'));
$this->dateRepository->remove($currentDate);
}
- $now = new \DateTime();
- $now = $now->getTimestamp();
+ $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']) > $now) {
+ 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']));
@@ -367,16 +373,16 @@ class DestinationDataImportService {
} else {
-
- if ($date['freq'] == 'Daily' && empty($date['weekdays'])) {
+ 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 > $now) {
+ if ($i >= $today) {
$eventStart = new \DateTime();
$eventStart->setTimestamp($i);
$eventStart->setTime($start->format('H'), $start->format('i'));
@@ -392,8 +398,7 @@ class DestinationDataImportService {
}
- else if ($date['freq'] == 'Weekly' && !empty($date['weekdays'])) {
-
+ 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']);
@@ -402,7 +407,7 @@ class DestinationDataImportService {
$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 > $now) {
+ if ($i >= $today) {
$eventStart = new \DateTime();
$eventStart->setTimestamp($i);
$eventStart->setTime($start->format('H'), $start->format('i'));
@@ -416,12 +421,10 @@ class DestinationDataImportService {
}
}
}
-
}
-
}
-
}
+ $this->logger->info('Finished setup dates');
}
/**
@@ -436,9 +439,7 @@ class DestinationDataImportService {
$this->tmpCurrentEvent->setOrganizer($tmpOrganizer);
continue;
}
-
$tmpOrganizer = $this->objectManager->get(\Wrm\Events\Domain\Model\Organizer::class);
-
$tmpOrganizer->setName($address['name']);
$tmpOrganizer->setCity($address['city']);
$tmpOrganizer->setZip($address['zip']);
@@ -447,27 +448,30 @@ class DestinationDataImportService {
$tmpOrganizer->setWeb($address['web']);
$tmpOrganizer->setEmail($address['email']);
$tmpOrganizer->setDistrict($address['district']);
-
$this->organizerRepository->add($tmpOrganizer);
$this->tmpCurrentEvent->setOrganizer($tmpOrganizer);
-
}
}
}
/**
- * @param string $name
- * @param string $street
- * @param string $city
- * @param string $zip
- * @param string $country
+ * @param array $event
*/
- protected function setAddress(String $name, String $street, String $city, String $zip, String $country) {
- $this->tmpCurrentEvent->setName($name);
- $this->tmpCurrentEvent->setStreet($street);
- $this->tmpCurrentEvent->setCity($city);
- $this->tmpCurrentEvent->setZip($zip);
- $this->tmpCurrentEvent->setCountry($country);
+ 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']);
}
/**
@@ -492,6 +496,9 @@ class DestinationDataImportService {
if ($text['rel'] == "teaser" && $text['type'] == "text/plain") {
$this->tmpCurrentEvent->setTeaser($text['value']);
}
+ if ($text['rel'] == "PRICE_INFO" && $text['type'] == "text/plain") {
+ $this->tmpCurrentEvent->setPriceInfo($text['value']);
+ }
}
}
@@ -528,6 +535,8 @@ class DestinationDataImportService {
*/
protected function setAssets(Array $assets) {
+ $this->logger->info("Set assets");
+
$error = false;
foreach ($assets as $media_object)
@@ -536,6 +545,11 @@ class DestinationDataImportService {
$this->storage = $this->resourceFactory->getDefaultStorage();
+ 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 . strtolower(basename($media_object['url'])))) {
$this->logger->info('File already exists');
@@ -634,7 +648,6 @@ class DestinationDataImportService {
*/
protected function doSlugUpdate()
{
-
$this->logger->info('Update slugs');
$slugHelper = GeneralUtility::makeInstance(
@@ -674,4 +687,4 @@ class DestinationDataImportService {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/Classes/ViewHelpers/FormViewHelper.php b/Classes/ViewHelpers/FormViewHelper.php
new file mode 100644
index 0000000..9231214
--- /dev/null
+++ b/Classes/ViewHelpers/FormViewHelper.php
@@ -0,0 +1,9 @@
+
+
+
+
+
+ Options
+
+ array
+
+
+
+ 1
+
+
+ select
+
+
+ Start
+ start
+
+
+ End
+ end
+
+
+
+
+
+
+
+
+ 1
+
+
+ select
+
+
+
+ Ascending
+
+ ASC
+
+
+
+ Descending
+
+ DESC
+
+
+ ASC
+
+
+
+
+
+
+ 1
+
+
+ input
+ 10
+ 30
+ trim
+
+
+
+
+
+
+ 1
+
+
+ check
+ 0
+
+
+
+
+
+
+ 1
+
+
+ check
+ 0
+
+
+
+
+
+
+ 1
+
+
+ check
+ 0
+
+
+
+
+
+
+ 1
+
+
+ group
+ db
+ pages
+ 1
+ 1
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+ Template
+
+ array
+
+
+ 1
+
+
+ select
+
+
+ Default
+ default
+
+
+ Costum
+ costum
+
+
+ Table
+ table
+
+
+ Grid
+ grid
+
+
+ default
+
+
+
+
+
+
+
+
+ Regions & Categories
+
+ array
+
+
+
+
+
+ select
+ tx_events_domain_model_region
+ AND tx_events_domain_model_region.deleted = 0 AND tx_events_domain_model_region.hidden = 0
+ 3
+ 0
+ 2
+
+
+
+
+
+
+ 1
+
+
+ select
+
+
+ And
+ 0
+
+
+ Or
+ 1
+
+
+ 0
+
+
+
+
+
+
+ 1
+
+
+ select
+ 20
+ sys_category
+ AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC
+ 1
+ tree
+ 8
+
+
+ 1
+ 1
+
+ parent
+
+
+
+
+
+
+
+ 1
+
+
+ check
+ 0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Configuration/FlexForms/DateSearch.xml b/Configuration/FlexForms/DateSearch.xml
new file mode 100644
index 0000000..ae07a9f
--- /dev/null
+++ b/Configuration/FlexForms/DateSearch.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+ Options
+
+ array
+
+
+
+ 1
+
+
+ group
+ db
+ pages
+ 1
+ 1
+ 0
+ 1
+
+
+
+
+
+ 1
+
+
+ check
+ 0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Configuration/FlexForms/DateShow.xml b/Configuration/FlexForms/DateShow.xml
new file mode 100644
index 0000000..b3eea3d
--- /dev/null
+++ b/Configuration/FlexForms/DateShow.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+ Options
+
+ array
+
+
+
+ 1
+
+
+ group
+ db
+ pages
+ 1
+ 1
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+ Template
+
+ array
+
+
+ 1
+
+
+ select
+
+
+ Default
+ default
+
+
+ Costum
+ costum
+
+
+ default
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php
index f83f45a..ab4974d 100644
--- a/Configuration/TCA/Overrides/tt_content.php
+++ b/Configuration/TCA/Overrides/tt_content.php
@@ -20,5 +20,53 @@ call_user_func(function () {
'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'
+ );
+
});
diff --git a/Configuration/TCA/tx_events_domain_model_date.php b/Configuration/TCA/tx_events_domain_model_date.php
index 41e3ea9..b29fa4f 100644
--- a/Configuration/TCA/tx_events_domain_model_date.php
+++ b/Configuration/TCA/tx_events_domain_model_date.php
@@ -120,7 +120,7 @@ return [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_date.start',
'config' => [
- 'dbType' => 'datetime',
+ //'dbType' => 'datetime',
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 12,
@@ -132,7 +132,7 @@ return [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_date.end',
'config' => [
- 'dbType' => 'datetime',
+ //'dbType' => 'datetime',
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 12,
@@ -141,14 +141,6 @@ return [
],
],
- /*
- 'event' => [
- 'config' => [
- 'type' => 'passthrough',
- ],
- ],
- */
-
'event' => array(
'exclude' => 1,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_date.event',
diff --git a/Configuration/TCA/tx_events_domain_model_event.php b/Configuration/TCA/tx_events_domain_model_event.php
index 58c3c2f..a521705 100644
--- a/Configuration/TCA/tx_events_domain_model_event.php
+++ b/Configuration/TCA/tx_events_domain_model_event.php
@@ -20,10 +20,10 @@ return [
'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, web, booking, ticket, facebook, youtube, latitude, longitude, images, categories, dates, organizer, region',
+ '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, booking, ticket, facebook, youtube, 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, web, booking, ticket, facebook, youtube, latitude, longitude, images, categories, dates, organizer, region, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
+ '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, booking, ticket, facebook, youtube, 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' => [
@@ -150,17 +150,6 @@ return [
'default' => '',
],
],
- /*
- 'slug' => [
- 'exclude' => true,
- 'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.slug',
- 'config' => [
- 'type' => 'input',
- 'size' => 30,
- 'eval' => 'trim'
- ],
- ],
- */
'highlight' => [
'exclude' => true,
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.highlight',
@@ -266,6 +255,15 @@ return [
'eval' => 'trim'
],
],
+ 'phone' => [
+ 'exclude' => true,
+ 'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.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_db.xlf:tx_events_domain_model_event.web',
diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript
index 9b055f4..5ab60de 100644
--- a/Configuration/TypoScript/constants.typoscript
+++ b/Configuration/TypoScript/constants.typoscript
@@ -13,6 +13,8 @@ plugin.tx_events {
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/
@@ -21,11 +23,15 @@ plugin.tx_events {
# cat=plugin.tx_events//a; type=string; label=Data Type
restType = Event
# cat=plugin.tx_events//a; type=string; label=Data Limit
- restLimit = 200
+ 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
}
}
}
diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript
index 0a73f24..46197a6 100644
--- a/Configuration/TypoScript/setup.typoscript
+++ b/Configuration/TypoScript/setup.typoscript
@@ -36,6 +36,7 @@ plugin.tx_events {
defaulDetailEventsPid =
defaultDetailDatesPid =
+ defaultImagePath = {$plugin.tx_events.settings.defaultImagePath}
paginate {
# can be overriden by plugin
@@ -50,10 +51,12 @@ plugin.tx_events {
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
\ No newline at end of file
+module.tx_events < plugin.tx_events
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index 7ff4e30..2933bfc 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -48,6 +48,9 @@
+
+
+
@@ -125,4 +128,4 @@