initial commit
This commit is contained in:
57
Classes/Domain/Model/MapEntry.php
Normal file
57
Classes/Domain/Model/MapEntry.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
}
|
57
Classes/Domain/Model/TravelAuthor.php
Normal file
57
Classes/Domain/Model/TravelAuthor.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Model;
|
||||
|
||||
use T3G\AgencyPack\Blog\Domain\Model\Author;
|
||||
use A2G\A2gTravelBlog\Domain\Model\TravelMarker;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* TravelAuthor
|
||||
*/
|
||||
class TravelAuthor extends Author {
|
||||
|
||||
|
||||
/**
|
||||
* relMapMarker
|
||||
*
|
||||
* @var TravelMarker
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relMapMarker = null;
|
||||
|
||||
/**
|
||||
* Returns the relMapMarker
|
||||
*
|
||||
* @return TravelMarker $relMapMarker
|
||||
*/
|
||||
public function getRelMapMarker() {
|
||||
if ($this->relMapMarker instanceof LazyLoadingProxy) {
|
||||
$this->relMapMarker = $this->relMapMarker->_loadRealInstance();
|
||||
}
|
||||
return $this->relMapMarker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relMapMarker
|
||||
*
|
||||
* @param TravelMarker $relMapMarker
|
||||
* @return void
|
||||
*/
|
||||
public function setRelMapMarker(TravelMarker $relMapMarker) {
|
||||
$this->relMapMarker = $relMapMarker;
|
||||
}
|
||||
|
||||
}
|
42
Classes/Domain/Model/TravelCategory.php
Normal file
42
Classes/Domain/Model/TravelCategory.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Model;
|
||||
|
||||
use T3G\AgencyPack\Blog\Domain\Model\Category;
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* TravelCategory
|
||||
*/
|
||||
class TravelCategory extends Category {
|
||||
|
||||
/**
|
||||
* isoA2CountryCode
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $isoA2CountryCode = '';
|
||||
|
||||
|
||||
public function getIsoA2CountryCode(): string {
|
||||
return $this->isoA2CountryCode;
|
||||
}
|
||||
|
||||
public function setIsoA2CountryCode(string $isoA2CountryCode): void {
|
||||
$this->isoA2CountryCode = $isoA2CountryCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
56
Classes/Domain/Model/TravelMarker.php
Normal file
56
Classes/Domain/Model/TravelMarker.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Model;
|
||||
|
||||
use A2G\A2gMaps\Domain\Model\Marker;
|
||||
use A2G\A2gTravelBlog\Domain\Model\TravelAuthor;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* TravelMarker
|
||||
*/
|
||||
class TravelMarker extends Marker {
|
||||
|
||||
|
||||
/**
|
||||
* relTravelAuthor
|
||||
*
|
||||
* @var TravelAuthor
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relTravelAuthor = null;
|
||||
|
||||
/**
|
||||
* Returns the relTravelAuthor
|
||||
*
|
||||
* @return TravelAuthor $relTravelAuthor
|
||||
*/
|
||||
public function getRelTravelAuthor() {
|
||||
if ($this->relTravelAuthor instanceof LazyLoadingProxy) {
|
||||
$this->relTravelAuthor = $this->relTravelAuthor->_loadRealInstance();
|
||||
}
|
||||
return $this->relTravelAuthor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relTravelAuthor
|
||||
*
|
||||
* @param TravelAuthor $relTravelAuthor
|
||||
* @return void
|
||||
*/
|
||||
public function setRelTravelAuthor(TravelAuthor $relTravelAuthor) {
|
||||
$this->relTravelAuthor = $relTravelAuthor;
|
||||
}
|
||||
|
||||
}
|
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