2019-07-18 13:44:19 +02:00
|
|
|
<?php
|
2021-01-07 08:50:43 +01:00
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
namespace Wrm\Events\Domain\Model;
|
|
|
|
|
|
|
|
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
2021-01-07 08:58:03 +01:00
|
|
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
2021-09-07 09:03:02 +02:00
|
|
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
2019-07-18 13:44:19 +02:00
|
|
|
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
2021-01-07 08:50:43 +01:00
|
|
|
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
2021-01-07 08:58:03 +01:00
|
|
|
use Wrm\Events\Domain\Repository\DateRepository;
|
2021-01-11 09:20:51 +01:00
|
|
|
use Wrm\Events\Service\DataProcessingForModels;
|
2019-07-18 13:44:19 +02:00
|
|
|
|
|
|
|
class Event extends AbstractEntity
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $title = '';
|
|
|
|
|
2021-02-15 09:58:51 +01:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $subtitle = '';
|
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $globalId = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $slug = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $highlight = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $teaser = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $details = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $priceInfo = '';
|
|
|
|
|
2020-08-17 14:21:03 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $name = '';
|
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $street = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $district = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $city = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $zip = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $country = '';
|
|
|
|
|
2020-03-16 13:52:58 +01:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $phone = '';
|
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $web = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $ticket = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $facebook = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $youtube = '';
|
|
|
|
|
2020-08-19 11:30:13 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $instagram = '';
|
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $latitude = '';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $longitude = '';
|
|
|
|
|
|
|
|
/**
|
2021-03-18 16:39:04 +01:00
|
|
|
* @var ObjectStorage<FileReference>
|
2021-01-07 15:46:39 +01:00
|
|
|
* @Extbase\ORM\Cascade remove
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-09-06 16:33:18 +02:00
|
|
|
protected $images;
|
2019-07-18 13:44:19 +02:00
|
|
|
|
|
|
|
/**
|
2021-09-06 16:33:18 +02:00
|
|
|
* @var ObjectStorage<Date>
|
2021-01-07 15:46:39 +01:00
|
|
|
* @Extbase\ORM\Cascade remove
|
2021-09-08 10:13:01 +02:00
|
|
|
* @Extbase\ORM\Lazy
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-09-06 16:33:18 +02:00
|
|
|
protected $dates;
|
2019-07-18 13:44:19 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var \Wrm\Events\Domain\Model\Organizer
|
|
|
|
*/
|
|
|
|
protected $organizer = null;
|
|
|
|
|
|
|
|
/**
|
2021-09-06 16:33:18 +02:00
|
|
|
* @var Region
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
|
|
|
protected $region = null;
|
|
|
|
|
2021-01-11 09:20:51 +01:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $pages = '';
|
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
/**
|
2021-09-06 16:33:18 +02:00
|
|
|
* @var ObjectStorage<Category>
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
|
|
|
protected $categories;
|
|
|
|
|
2022-07-05 14:08:14 +02:00
|
|
|
/**
|
|
|
|
* @var ObjectStorage<Category>
|
|
|
|
*/
|
|
|
|
protected $features;
|
|
|
|
|
2021-01-11 10:15:21 +01:00
|
|
|
/**
|
2021-09-06 16:33:18 +02:00
|
|
|
* @var ObjectStorage<Partner>
|
2021-01-11 10:15:21 +01:00
|
|
|
*/
|
|
|
|
protected $partner;
|
|
|
|
|
2021-07-13 09:31:01 +02:00
|
|
|
/**
|
2021-09-06 16:33:18 +02:00
|
|
|
* @var ObjectStorage<Event>
|
2021-07-13 09:31:01 +02:00
|
|
|
*/
|
|
|
|
protected $referencesEvents;
|
|
|
|
|
2020-10-01 08:34:13 +02:00
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
2020-10-01 08:56:44 +02:00
|
|
|
protected $_languageUid;
|
2020-10-01 08:34:13 +02:00
|
|
|
|
2021-01-11 09:20:51 +01:00
|
|
|
/**
|
|
|
|
* @var DataProcessingForModels
|
|
|
|
*/
|
2021-01-11 10:16:10 +01:00
|
|
|
protected $dataProcessing = null;
|
2021-01-11 09:20:51 +01:00
|
|
|
|
2019-07-18 13:44:19 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->initStorageObjects();
|
|
|
|
}
|
|
|
|
|
2021-01-11 09:20:51 +01:00
|
|
|
/**
|
|
|
|
* @param DataProcessingForModels $dataProcessing
|
|
|
|
*/
|
2021-09-07 09:52:14 +02:00
|
|
|
public function injectDataProcessingForModels(DataProcessingForModels $dataProcessing): void
|
2021-01-11 09:20:51 +01:00
|
|
|
{
|
|
|
|
$this->dataProcessing = $dataProcessing;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function initializeObject(): void
|
2021-07-13 09:31:42 +02:00
|
|
|
{
|
|
|
|
$this->initStorageObjects();
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
protected function initStorageObjects(): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
2021-09-06 16:33:18 +02:00
|
|
|
$this->images = new ObjectStorage();
|
2019-07-18 13:44:19 +02:00
|
|
|
$this->dates = new ObjectStorage();
|
2021-09-06 16:33:18 +02:00
|
|
|
$this->categories = new ObjectStorage();
|
2022-07-05 14:08:14 +02:00
|
|
|
$this->features = new ObjectStorage();
|
2021-09-06 16:33:18 +02:00
|
|
|
$this->partner = new ObjectStorage();
|
2021-07-13 09:31:01 +02:00
|
|
|
$this->referencesEvents = new ObjectStorage();
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getGlobalId(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->globalId;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setGlobalId(string $globalId): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->globalId = $globalId;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getTitle(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->title;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setTitle(string $title): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->title = $title;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getSubtitle(): string
|
2021-02-15 09:58:51 +01:00
|
|
|
{
|
|
|
|
return $this->subtitle;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setSubtitle(string $subtitle): void
|
2021-02-15 09:58:51 +01:00
|
|
|
{
|
|
|
|
$this->subtitle = $subtitle;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getTeaser(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->teaser;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setTeaser(string $teaser): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->teaser = $teaser;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getDetails(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->details;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setDetails(string $details): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->details = $details;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getPriceInfo(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->priceInfo;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setPriceInfo(string $priceInfo): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->priceInfo = $priceInfo;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getName(): string
|
2020-08-17 14:21:03 +02:00
|
|
|
{
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setName(string $name): void
|
2020-08-17 14:21:03 +02:00
|
|
|
{
|
|
|
|
$this->name = $name;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getStreet(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->street;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setStreet(string $street): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->street = $street;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string $district
|
|
|
|
*/
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getDistrict(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->district;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setDistrict(string $district): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->district = $district;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getCity(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->city;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setCity(string $city): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->city = $city;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getZip(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->zip;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setZip(string $zip): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->zip = $zip;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getPhone(): string
|
2020-03-16 13:52:58 +01:00
|
|
|
{
|
|
|
|
return $this->phone;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setPhone(string $phone): void
|
2020-03-16 13:52:58 +01:00
|
|
|
{
|
|
|
|
$this->phone = $phone;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getWeb(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->web;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setWeb(string $web): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->web = $web;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getTicket(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->ticket;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setTicket(string $ticket): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->ticket = $ticket;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getFacebook(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->facebook;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setFacebook(string $facebook): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->facebook = $facebook;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getYoutube(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->youtube;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setYoutube(string $youtube): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->youtube = $youtube;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getInstagram(): string
|
2020-08-19 11:30:13 +02:00
|
|
|
{
|
|
|
|
return $this->instagram;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setInstagram(string $instagram): void
|
2020-08-19 11:30:13 +02:00
|
|
|
{
|
|
|
|
$this->instagram = $instagram;
|
|
|
|
}
|
2021-01-07 08:50:43 +01:00
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getLatitude(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->latitude;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setLatitude(string $latitude): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->latitude = $latitude;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getLongitude(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->longitude;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setLongitude(string $longitude): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->longitude = $longitude;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-03-18 16:39:04 +01:00
|
|
|
* @return ObjectStorage<FileReference> $images
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-03-18 16:39:04 +01:00
|
|
|
public function getImages(): ObjectStorage
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->images;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-03-18 16:39:04 +01:00
|
|
|
* @param ObjectStorage<FileReference> $images
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setImages(ObjectStorage $images): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->images = $images;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getSlug(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->slug;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setSlug(string $slug): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->slug = $slug;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function addDate(Date $date): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->dates->attach($date);
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function removeDate(Date $date): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->dates->detach($date);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-09-07 09:52:14 +02:00
|
|
|
* @return ObjectStorage<Date>
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
|
|
|
public function getDates(): ObjectStorage
|
|
|
|
{
|
|
|
|
return $this->dates;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-09-07 09:52:14 +02:00
|
|
|
* @param ObjectStorage<Date> $dates
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setDates(ObjectStorage $dates): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->dates = $dates;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-09-07 09:52:14 +02:00
|
|
|
* @param ObjectStorage<Date> $dates
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-09-07 09:52:14 +02:00
|
|
|
public function removeAllDates(ObjectStorage $dates): void
|
2021-01-07 08:50:43 +01:00
|
|
|
{
|
2019-07-18 13:44:19 +02:00
|
|
|
$this->dates->removeAll($dates);
|
|
|
|
}
|
|
|
|
|
2021-01-11 10:15:21 +01:00
|
|
|
/**
|
|
|
|
* @return ObjectStorage<Partner>
|
|
|
|
*/
|
|
|
|
public function getPartner(): ObjectStorage
|
|
|
|
{
|
|
|
|
return $this->partner;
|
|
|
|
}
|
|
|
|
|
2021-07-13 09:31:01 +02:00
|
|
|
/**
|
|
|
|
* @return ObjectStorage<Event>
|
|
|
|
*/
|
|
|
|
public function getReferencesEvents(): ObjectStorage
|
|
|
|
{
|
|
|
|
return $this->referencesEvents;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setOrganizer(Organizer $organizer): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->organizer = $organizer;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getOrganizer(): ?Organizer
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
2021-09-07 09:52:14 +02:00
|
|
|
return $this->organizer;
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getRegion(): ?Region
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
2021-09-07 09:52:14 +02:00
|
|
|
return $this->region;
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setRegion(Region $region): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
2021-09-07 09:52:14 +02:00
|
|
|
$this->region = $region;
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setHighlight(bool $highlight): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->highlight = $highlight;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function isHighlight(): bool
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->highlight;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getCountry(): string
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
return $this->country;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setCountry(string $country): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->country = $country;
|
|
|
|
}
|
|
|
|
|
2021-01-11 09:20:51 +01:00
|
|
|
public function getPages(): array
|
|
|
|
{
|
|
|
|
static $pages = null;
|
|
|
|
if (is_array($pages)) {
|
|
|
|
return $pages;
|
|
|
|
}
|
|
|
|
|
|
|
|
$pages = $this->dataProcessing->process($this);
|
|
|
|
|
|
|
|
return $pages;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function addCategory(Category $category): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->categories->attach($category);
|
|
|
|
}
|
|
|
|
|
2021-03-23 16:34:38 +01:00
|
|
|
public function getCategories(): array
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
2021-03-23 16:34:38 +01:00
|
|
|
$categories = $this->categories->toArray();
|
|
|
|
|
|
|
|
usort($categories, function (Category $catA, Category $catB) {
|
|
|
|
return $catA->getSorting() <=> $catB->getSorting();
|
|
|
|
});
|
|
|
|
|
|
|
|
return $categories;
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-09-07 09:52:14 +02:00
|
|
|
* @param ObjectStorage<Category> $categories
|
2019-07-18 13:44:19 +02:00
|
|
|
*/
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setCategories(ObjectStorage $categories): void
|
2019-07-18 13:44:19 +02:00
|
|
|
{
|
|
|
|
$this->categories = $categories;
|
|
|
|
}
|
2020-10-01 08:34:13 +02:00
|
|
|
|
2022-07-05 14:08:14 +02:00
|
|
|
public function getFeatures(): array
|
|
|
|
{
|
|
|
|
$features = $this->features->toArray();
|
|
|
|
|
|
|
|
usort($features, function (Category $catA, Category $catB) {
|
|
|
|
return $catA->getSorting() <=> $catB->getSorting();
|
|
|
|
});
|
|
|
|
|
|
|
|
return $features;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param ObjectStorage<Category> $features
|
|
|
|
*/
|
|
|
|
public function setFeatures(ObjectStorage $features): void
|
|
|
|
{
|
|
|
|
$this->features = $features;
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function setLanguageUid(int $languageUid): void
|
2021-01-07 08:50:43 +01:00
|
|
|
{
|
2020-10-01 08:56:44 +02:00
|
|
|
$this->_languageUid = $languageUid;
|
2020-10-01 08:34:13 +02:00
|
|
|
}
|
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getLanguageUid(): int
|
2021-01-07 08:50:43 +01:00
|
|
|
{
|
2020-10-01 08:56:44 +02:00
|
|
|
return $this->_languageUid;
|
2020-10-01 08:34:13 +02:00
|
|
|
}
|
2021-03-16 08:10:46 +01:00
|
|
|
|
2021-09-07 09:52:14 +02:00
|
|
|
public function getLocalizedUid(): int
|
2021-03-16 08:10:46 +01:00
|
|
|
{
|
|
|
|
return $this->_localizedUid;
|
|
|
|
}
|
2019-07-18 13:44:19 +02:00
|
|
|
}
|