281 lines
5.0 KiB
PHP
281 lines
5.0 KiB
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace A2G\A2gMaps\Domain\Model;
|
||
|
|
||
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||
|
use TYPO3\CMS\Extbase\Annotation\ORM\{
|
||
|
Cascade,
|
||
|
Lazy
|
||
|
};
|
||
|
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||
|
|
||
|
/**
|
||
|
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
|
||
|
*
|
||
|
* For the full copyright and license information, please read the
|
||
|
* LICENSE.txt file that was distributed with this source code.
|
||
|
*
|
||
|
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* MapEntry
|
||
|
*/
|
||
|
class MapEntry extends AbstractEntity {
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $addressline = '';
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $zip = '';
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $city = '';
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $region = '';
|
||
|
|
||
|
|
||
|
/**
|
||
|
* latitude
|
||
|
*
|
||
|
* @var float
|
||
|
*/
|
||
|
protected $latitude = 0.0;
|
||
|
|
||
|
/**
|
||
|
* longitude
|
||
|
*
|
||
|
* @var float
|
||
|
*/
|
||
|
protected $longitude = 0.0;
|
||
|
|
||
|
/**
|
||
|
* title
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $title = '';
|
||
|
|
||
|
/**
|
||
|
* pathSegment
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $pathSegment = '';
|
||
|
|
||
|
/**
|
||
|
* popupContent
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $popupContent = '';
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $navToUrl = '';
|
||
|
|
||
|
|
||
|
/**
|
||
|
* image
|
||
|
*
|
||
|
* @var FileReference
|
||
|
* @Cascade("remove")
|
||
|
* @Lazy
|
||
|
*/
|
||
|
protected $image = null;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* relMarker
|
||
|
*
|
||
|
* @var Marker
|
||
|
* @Lazy
|
||
|
*/
|
||
|
protected $relMarker = null;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return float
|
||
|
*/
|
||
|
public function getLatitude(): float {
|
||
|
return $this->latitude;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return float
|
||
|
*/
|
||
|
public function getLongitude(): float {
|
||
|
return $this->longitude;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getTitle(): string {
|
||
|
return $this->title;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getPathSegment(): string {
|
||
|
return $this->pathSegment;
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return null|Marker
|
||
|
*/
|
||
|
public function getRelMarker(): ?Marker {
|
||
|
if ($this->relMarker instanceof LazyLoadingProxy) {
|
||
|
$this->relMarker = $this->relMarker->_loadRealInstance();
|
||
|
}
|
||
|
return $this->relMarker;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param Marker $relMarker
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setRelMarker(?Marker $relMarker): void {
|
||
|
$this->relMarker = $relMarker;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return null|FileReference
|
||
|
*/
|
||
|
public function getImage(): ?FileReference {
|
||
|
if ($this->image instanceof LazyLoadingProxy) {
|
||
|
$this->image = $this->image->_loadRealInstance();
|
||
|
}
|
||
|
return $this->image;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param float $latitude
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setLatitude(float $latitude): void {
|
||
|
$this->latitude = $latitude;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param float $longitude
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setLongitude(float $longitude): void {
|
||
|
$this->longitude = $longitude;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param string $title
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setTitle(string $title): void {
|
||
|
$this->title = $title;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param string $pathSegment
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setPathSegment(string $pathSegment): void {
|
||
|
$this->pathSegment = $pathSegment;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param null|FileReference $image
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setImage(?FileReference $image): void {
|
||
|
$this->image = $image;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getPopupContent(): string {
|
||
|
return $this->popupContent;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param string $popupContent
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setPopupContent(string $popupContent): void {
|
||
|
$this->popupContent = $popupContent;
|
||
|
}
|
||
|
public function getAddressline(): string {
|
||
|
return $this->addressline;
|
||
|
}
|
||
|
|
||
|
public function getZip(): string {
|
||
|
return $this->zip;
|
||
|
}
|
||
|
|
||
|
public function getCity(): string {
|
||
|
return $this->city;
|
||
|
}
|
||
|
|
||
|
public function getRegion(): string {
|
||
|
return $this->region;
|
||
|
}
|
||
|
|
||
|
public function setAddressline(string $addressline): void {
|
||
|
$this->addressline = $addressline;
|
||
|
}
|
||
|
|
||
|
public function setZip(string $zip): void {
|
||
|
$this->zip = $zip;
|
||
|
}
|
||
|
|
||
|
public function setCity(string $city): void {
|
||
|
$this->city = $city;
|
||
|
}
|
||
|
|
||
|
public function setRegion(string $region): void {
|
||
|
$this->region = $region;
|
||
|
}
|
||
|
|
||
|
public function getNavToUrl(): string {
|
||
|
return $this->navToUrl;
|
||
|
}
|
||
|
|
||
|
public function setNavToUrl(string $navToUrl): void {
|
||
|
$this->navToUrl = $navToUrl;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|