mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 10:16:09 +01:00
Allow to reference events from event
This might be useful to allow editors and integrators to create something like "you might also be interested in" or "related events".
This commit is contained in:
parent
97bcbe2065
commit
326378e2fc
5 changed files with 38 additions and 0 deletions
|
@ -217,6 +217,11 @@ class Event extends AbstractEntity
|
||||||
*/
|
*/
|
||||||
protected $partner;
|
protected $partner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Event>
|
||||||
|
*/
|
||||||
|
protected $referencesEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
@ -251,6 +256,7 @@ class Event extends AbstractEntity
|
||||||
protected function initStorageObjects()
|
protected function initStorageObjects()
|
||||||
{
|
{
|
||||||
$this->dates = new ObjectStorage();
|
$this->dates = new ObjectStorage();
|
||||||
|
$this->referencesEvents = new ObjectStorage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -674,6 +680,14 @@ class Event extends AbstractEntity
|
||||||
return $this->partner;
|
return $this->partner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ObjectStorage<Event>
|
||||||
|
*/
|
||||||
|
public function getReferencesEvents(): ObjectStorage
|
||||||
|
{
|
||||||
|
return $this->referencesEvents;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Wrm\Events\Domain\Model\Organizer $organizer
|
* @param \Wrm\Events\Domain\Model\Organizer $organizer
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
@ -63,6 +63,7 @@ return [
|
||||||
region,
|
region,
|
||||||
partner,
|
partner,
|
||||||
categories,
|
categories,
|
||||||
|
references_events,
|
||||||
pages,
|
pages,
|
||||||
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.media,
|
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.media,
|
||||||
images,
|
images,
|
||||||
|
@ -524,6 +525,21 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'references_events' => [
|
||||||
|
'exclude' => true,
|
||||||
|
'label' => $l10nPath . ':tx_events_domain_model_event.references_events',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'group',
|
||||||
|
'internal_type' => 'db',
|
||||||
|
'allowed' => 'tx_events_domain_model_event',
|
||||||
|
'suggestOptions' => [
|
||||||
|
'tx_events_domain_model_event' => [
|
||||||
|
'searchCondition' => 'tx_events_domain_model_event.sys_language_uid IN (0, -1)',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
'partner' => [
|
'partner' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'label' => $l10nPath . ':tx_events_domain_model_event.partner',
|
'label' => $l10nPath . ':tx_events_domain_model_event.partner',
|
||||||
|
|
|
@ -159,6 +159,10 @@
|
||||||
<source>Partner</source>
|
<source>Partner</source>
|
||||||
<target>Partner</target>
|
<target>Partner</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.references_events">
|
||||||
|
<source>Related Events</source>
|
||||||
|
<target>Ähnliche Veranstaltungen</target>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
|
|
@ -117,6 +117,9 @@
|
||||||
<trans-unit id="tx_events_domain_model_event.partner">
|
<trans-unit id="tx_events_domain_model_event.partner">
|
||||||
<source>Partner</source>
|
<source>Partner</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.references_events">
|
||||||
|
<source>Related Events</source>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
|
|
@ -32,6 +32,7 @@ CREATE TABLE tx_events_domain_model_event (
|
||||||
organizer int(11) unsigned DEFAULT '0',
|
organizer int(11) unsigned DEFAULT '0',
|
||||||
partner text,
|
partner text,
|
||||||
region int(11) unsigned DEFAULT '0',
|
region int(11) unsigned DEFAULT '0',
|
||||||
|
references_events text,
|
||||||
KEY dataHandler (l10n_parent, t3ver_oid, deleted, t3ver_wsid, t3ver_state)
|
KEY dataHandler (l10n_parent, t3ver_oid, deleted, t3ver_wsid, t3ver_state)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue