initial commit
This commit is contained in:
86
Classes/Domain/Model/TravelPost.php
Normal file
86
Classes/Domain/Model/TravelPost.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Model;
|
||||
|
||||
use \T3G\AgencyPack\Blog\Domain\Model\Post;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
/**
|
||||
* This file is part of the "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
|
||||
*/
|
||||
|
||||
/**
|
||||
* TravelPost
|
||||
*/
|
||||
class TravelPost extends Post {
|
||||
|
||||
/**
|
||||
* relMapEntries
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gTravelBlog\Domain\Model\MapEntry>
|
||||
*/
|
||||
protected $relMapEntries = null;
|
||||
|
||||
/**
|
||||
* Post constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* initializeObject
|
||||
*/
|
||||
public function initializeObject(): void
|
||||
{
|
||||
$this->relMapEntries = new ObjectStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ObjectStorage
|
||||
*/
|
||||
public function getRelMapEntries(): ObjectStorage
|
||||
{
|
||||
return $this->relMapEntries;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ObjectStorage $relMapEntries
|
||||
* @return TravelPost
|
||||
*/
|
||||
public function setRelMapEntries($relMapEntries): self
|
||||
{
|
||||
$this->relMapEntries = $relMapEntries;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param MapEntry $relMapEntry
|
||||
* @return TravelPost
|
||||
*/
|
||||
public function addRelMapEntry(MapEntry $relMapEntry): self
|
||||
{
|
||||
$this->relMapEntries->attach($relMapEntry);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param MapEntry $relMapEntry
|
||||
*
|
||||
* @return TravelPost
|
||||
*/
|
||||
public function removeRelMapEntry(MapEntry $relMapEntry): self
|
||||
{
|
||||
$this->relMapEntries->detach($relMapEntry);
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user