mirror of
https://github.com/werkraum-media/events.git
synced 2024-12-22 17:06:09 +01:00
Add location name
This commit is contained in:
parent
424279282d
commit
3f55a189eb
5 changed files with 44 additions and 5 deletions
|
@ -63,6 +63,13 @@ class Event extends AbstractEntity
|
|||
*/
|
||||
protected $priceInfo = '';
|
||||
|
||||
/**
|
||||
* name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name = '';
|
||||
|
||||
/**
|
||||
* street
|
||||
*
|
||||
|
@ -289,6 +296,23 @@ class Event extends AbstractEntity
|
|||
$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
|
||||
*/
|
||||
|
|
|
@ -271,8 +271,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['name'] && $event['street'] && $event['city'] && $event['zip'] && $event['country'])
|
||||
$this->setAddress($event['name'], $event['street'], $event['city'], $event['zip'], $event['country']);
|
||||
|
||||
// Set LatLng
|
||||
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
|
||||
|
@ -456,12 +456,14 @@ class DestinationDataImportService {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $street
|
||||
* @param string $city
|
||||
* @param string $zip
|
||||
* @param string $country
|
||||
*/
|
||||
protected function setAddress(String $street, String $city, String $zip, String $country) {
|
||||
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);
|
||||
|
|
|
@ -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, name, street, district, city, zip, country, 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, 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'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
|
@ -212,6 +212,15 @@ return [
|
|||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'name' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.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_db.xlf:tx_events_domain_model_event.street',
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<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>
|
||||
|
|
|
@ -10,6 +10,7 @@ CREATE TABLE tx_events_domain_model_event (
|
|||
teaser text,
|
||||
details text,
|
||||
price_info text,
|
||||
name varchar(255) DEFAULT '' NOT NULL,
|
||||
street varchar(255) DEFAULT '' NOT NULL,
|
||||
district varchar(255) DEFAULT '' NOT NULL,
|
||||
city varchar(255) DEFAULT '' NOT NULL,
|
||||
|
|
Loading…
Reference in a new issue