57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace A2G\A2gTravelBlog\Domain\Model;
|
||
|
use A2G\A2gMaps\Domain\Model\MapEntry as BaseMapEntry;
|
||
|
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 BaseMapEntry {
|
||
|
|
||
|
/**
|
||
|
* relTravelPost
|
||
|
*
|
||
|
* @Cascade("remove")
|
||
|
* @Lazy
|
||
|
* @var TravelPost
|
||
|
*/
|
||
|
protected $relTravelPost = null;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @return TravelPost
|
||
|
*/
|
||
|
public function getRelTravelPost(): TravelPost {
|
||
|
if ($this->relTravelPost instanceof LazyLoadingProxy) {
|
||
|
$this->relTravelPost = $this->relTravelPost->_loadRealInstance();
|
||
|
}
|
||
|
return $this->relTravelPost;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @param TravelPost $relTravelPost
|
||
|
* @return void
|
||
|
*/
|
||
|
public function setRelTravelPost(TravelPost $relTravelPost): void {
|
||
|
$this->relTravelPost = $relTravelPost;
|
||
|
}
|
||
|
|
||
|
}
|