mirror of
https://github.com/werkraum-media/events.git
synced 2024-12-22 17:06:09 +01:00
Add social links
This commit is contained in:
parent
e13cc33e41
commit
3e643176a3
6 changed files with 68 additions and 49 deletions
|
@ -23,13 +23,13 @@ class DestinationDataImportCommand extends Command {
|
|||
'storage-pid',
|
||||
InputArgument::OPTIONAL,
|
||||
'What is the storage pid?',
|
||||
'284'
|
||||
'6'
|
||||
);
|
||||
$this->addArgument(
|
||||
'region-uid',
|
||||
InputArgument::OPTIONAL,
|
||||
'What is the region uid?',
|
||||
'6'
|
||||
'1'
|
||||
);
|
||||
$this->addArgument('rest-experience',
|
||||
InputArgument::OPTIONAL,
|
||||
|
|
|
@ -106,7 +106,7 @@ class Event extends AbstractEntity
|
|||
protected $country = '';
|
||||
|
||||
/**
|
||||
* web
|
||||
* phone
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
@ -119,13 +119,6 @@ class Event extends AbstractEntity
|
|||
*/
|
||||
protected $web = '';
|
||||
|
||||
/**
|
||||
* booking
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $booking = '';
|
||||
|
||||
/**
|
||||
* ticket
|
||||
*
|
||||
|
@ -147,6 +140,13 @@ class Event extends AbstractEntity
|
|||
*/
|
||||
protected $youtube = '';
|
||||
|
||||
/**
|
||||
* instagram
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $instagram = '';
|
||||
|
||||
/**
|
||||
* latitude
|
||||
*
|
||||
|
@ -421,23 +421,6 @@ class Event extends AbstractEntity
|
|||
$this->web = $web;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $booking
|
||||
*/
|
||||
public function getBooking()
|
||||
{
|
||||
return $this->booking;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $booking
|
||||
* @return void
|
||||
*/
|
||||
public function setBooking($booking)
|
||||
{
|
||||
$this->booking = $booking;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $ticket
|
||||
*/
|
||||
|
@ -489,6 +472,22 @@ class Event extends AbstractEntity
|
|||
$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
|
||||
*/
|
||||
|
|
|
@ -87,9 +87,9 @@ class DestinationDataImportService {
|
|||
*/
|
||||
protected $environment;
|
||||
/**
|
||||
* @var bool
|
||||
* @var
|
||||
*/
|
||||
protected $tmpCurrentEvent = FALSE;
|
||||
protected $tmpCurrentEvent;
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
|
@ -275,8 +275,7 @@ class DestinationDataImportService {
|
|||
$this->setTexts($event['texts']);
|
||||
|
||||
// Set address and geo data
|
||||
|
||||
if($event['name'] || $event['street'] || $event['city'] || $event['zip'] || $event['country'])
|
||||
if($event['name'] || $event['street'] || $event['city'] || $event['zip'] || $event['country'] || $event['web'])
|
||||
$this->setAddress($event);
|
||||
|
||||
// Set LatLng
|
||||
|
@ -291,6 +290,10 @@ class DestinationDataImportService {
|
|||
if($event['addresses'])
|
||||
$this->setOrganizer($event['addresses']);
|
||||
|
||||
// Set Social and Tickets
|
||||
if($event['media_objects'])
|
||||
$this->setSocial($event['media_objects']);
|
||||
|
||||
// Set Dates
|
||||
if($event['timeIntervals'])
|
||||
$this->setDates($event['timeIntervals']);
|
||||
|
@ -474,6 +477,23 @@ class DestinationDataImportService {
|
|||
$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']);
|
||||
if ($link['rel'] == "booking")
|
||||
$this->tmpCurrentEvent->setTicket($link['url']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $lat
|
||||
* @param string $lng
|
||||
|
@ -491,13 +511,13 @@ class DestinationDataImportService {
|
|||
foreach ($texts as $text)
|
||||
{
|
||||
if ($text['rel'] == "details" && $text['type'] == "text/plain") {
|
||||
$this->tmpCurrentEvent->setDetails($text['value']);
|
||||
$this->tmpCurrentEvent->setDetails(str_replace('\n\n', '\n', $text['value']));
|
||||
}
|
||||
if ($text['rel'] == "teaser" && $text['type'] == "text/plain") {
|
||||
$this->tmpCurrentEvent->setTeaser($text['value']);
|
||||
$this->tmpCurrentEvent->setTeaser(str_replace('\n\n', '\n', $text['value']));
|
||||
}
|
||||
if ($text['rel'] == "PRICE_INFO" && $text['type'] == "text/plain") {
|
||||
$this->tmpCurrentEvent->setPriceInfo($text['value']);
|
||||
$this->tmpCurrentEvent->setPriceInfo(str_replace('\n\n', '\n', $text['value']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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, phone, 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, 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, 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, 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' => [
|
||||
|
@ -273,15 +273,6 @@ return [
|
|||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'booking' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.booking',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'ticket' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.ticket',
|
||||
|
@ -309,6 +300,15 @@ return [
|
|||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'instagram' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.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_db.xlf:tx_events_domain_model_event.latitude',
|
||||
|
|
|
@ -57,9 +57,6 @@
|
|||
<trans-unit id="tx_events_domain_model_event.phone">
|
||||
<source>Phone</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.booking">
|
||||
<source>Booking</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_event.ticket">
|
||||
<source>Ticket</source>
|
||||
</trans-unit>
|
||||
|
@ -69,6 +66,9 @@
|
|||
<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>
|
||||
|
|
|
@ -18,10 +18,10 @@ CREATE TABLE tx_events_domain_model_event (
|
|||
country varchar(255) DEFAULT '' NOT NULL,
|
||||
web varchar(255) DEFAULT '' NOT NULL,
|
||||
phone varchar(255) DEFAULT '' NOT NULL,
|
||||
booking varchar(255) DEFAULT '' NOT NULL,
|
||||
ticket varchar(255) DEFAULT '' NOT NULL,
|
||||
facebook varchar(255) DEFAULT '' NOT NULL,
|
||||
youtube varchar(255) DEFAULT '' NOT NULL,
|
||||
instagram varchar(255) DEFAULT '' NOT NULL,
|
||||
latitude varchar(255) DEFAULT '' NOT NULL,
|
||||
longitude varchar(255) DEFAULT '' NOT NULL,
|
||||
images int(11) unsigned NOT NULL default '0',
|
||||
|
|
Loading…
Reference in a new issue