diff --git a/Classes/Domain/Model/Event.php b/Classes/Domain/Model/Event.php
index 09ae89a..74a6d37 100644
--- a/Classes/Domain/Model/Event.php
+++ b/Classes/Domain/Model/Event.php
@@ -98,6 +98,13 @@ class Event extends AbstractEntity
*/
protected $country = '';
+ /**
+ * web
+ *
+ * @var string
+ */
+ protected $phone = '';
+
/**
* web
*
@@ -357,6 +364,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/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php
index 7bae77a..587cd12 100644
--- a/Classes/Service/DestinationDataImportService.php
+++ b/Classes/Service/DestinationDataImportService.php
@@ -275,8 +275,8 @@ class DestinationDataImportService {
$this->setTexts($event['texts']);
// Set address and geo data
- if($event['street'] && $event['city'] && $event['zip'] && $event['country'])
- $this->setAddress($event['street'], $event['city'], $event['zip'], $event['country']);
+ if($event['street'] || $event['city'] || $event['zip'] || $event['country'])
+ $this->setAddress($event);
// Set LatLng
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
@@ -454,16 +454,21 @@ class DestinationDataImportService {
}
/**
- * @param string $street
- * @param string $city
- * @param string $zip
- * @param string $country
+ * @param array $event
*/
- protected function setAddress(String $street, String $city, String $zip, String $country) {
- $this->tmpCurrentEvent->setStreet($street);
- $this->tmpCurrentEvent->setCity($city);
- $this->tmpCurrentEvent->setZip($zip);
- $this->tmpCurrentEvent->setCountry($country);
+ protected function setAddress(Array $event) {
+ 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']);
}
/**
diff --git a/Configuration/TCA/tx_events_domain_model_event.php b/Configuration/TCA/tx_events_domain_model_event.php
index 4ee748d..6a9f2a6 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, 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, 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, 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, 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' => [
@@ -257,6 +257,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/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index 5b73fd5..9e0b592 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -45,6 +45,9 @@
+
+
+
@@ -122,4 +125,4 @@