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;
|
||||
}
|
||||
}
|
50
Classes/Domain/Repository/MapEntryRepository.php
Normal file
50
Classes/Domain/Repository/MapEntryRepository.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for MapEntry
|
||||
*/
|
||||
class MapEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
// protected $defaultOrderings = [
|
||||
// 'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
// ];
|
||||
|
||||
static protected function mapInt($value){
|
||||
if(MathUtility::canBeInterpretedAsInteger($value)){
|
||||
return (int)$value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getFromCategoryUids(array $uids){
|
||||
$uidsFiltered = array_filter(array_map('self::mapInt', $uids));
|
||||
$query = $this->createQuery();
|
||||
$query->matching(
|
||||
$query->logicalOr($query->in('relTravelPost.categories.uid', $uidsFiltered)));
|
||||
return $query->execute();
|
||||
|
||||
}
|
||||
public function initializeObject() {
|
||||
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
|
||||
$querySettings->setRespectStoragePage(false);
|
||||
$this->setDefaultQuerySettings($querySettings);
|
||||
}
|
||||
}
|
49
Classes/Domain/Repository/TravelAuthorRepository.php
Normal file
49
Classes/Domain/Repository/TravelAuthorRepository.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Repository;
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
|
||||
/**
|
||||
* This file is part of the "Travel Blog" 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for TravelAuthor
|
||||
*/
|
||||
class TravelAuthorRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
// protected $defaultOrderings = [
|
||||
// 'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
// ];
|
||||
|
||||
static protected function mapInt($value){
|
||||
if(MathUtility::canBeInterpretedAsInteger($value)){
|
||||
return (int)$value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getFromUids(array $uids){
|
||||
$uidsFiltered = array_filter(array_map('self::mapInt', $uids));
|
||||
$query = $this->createQuery();
|
||||
$query->matching(
|
||||
$query->logicalOr($query->in('uid', $uidsFiltered)));
|
||||
return $query->execute();
|
||||
|
||||
}
|
||||
public function initializeObject() {
|
||||
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
|
||||
$querySettings->setRespectStoragePage(false);
|
||||
$this->setDefaultQuerySettings($querySettings);
|
||||
}
|
||||
}
|
42
Classes/Domain/Repository/TravelCategoryRepository.php
Normal file
42
Classes/Domain/Repository/TravelCategoryRepository.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for TravelPost
|
||||
*/
|
||||
class TravelCategoryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
// protected $defaultOrderings = [
|
||||
// 'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
// ];
|
||||
//
|
||||
static protected function mapInt($value){
|
||||
if(MathUtility::canBeInterpretedAsInteger($value)){
|
||||
return (int)$value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function initializeObject() {
|
||||
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
|
||||
$querySettings->setRespectStoragePage(false);
|
||||
$this->setDefaultQuerySettings($querySettings);
|
||||
}
|
||||
}
|
61
Classes/Domain/Repository/TravelPostRepository.php
Normal file
61
Classes/Domain/Repository/TravelPostRepository.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for TravelPost
|
||||
*/
|
||||
class TravelPostRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultOrderings = [
|
||||
'crdate' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING
|
||||
];
|
||||
|
||||
static protected function mapInt($value){
|
||||
if(MathUtility::canBeInterpretedAsInteger($value)){
|
||||
return (int)$value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getFromCategoryUids(array $uids){
|
||||
$uidsFiltered = array_filter(array_map('self::mapInt', $uids));
|
||||
$query = $this->createQuery();
|
||||
$query->matching($query->in('categories.uid', $uidsFiltered));
|
||||
return $query->execute();
|
||||
}
|
||||
public function getFromAuthorUids(array $uids){
|
||||
$uidsFiltered = array_filter(array_map('self::mapInt', $uids));
|
||||
$query = $this->createQuery();
|
||||
$query->matching($query->in('authors.uid', $uidsFiltered));
|
||||
return $query->execute();
|
||||
}
|
||||
public function getFromTagUids(array $uids){
|
||||
$uidsFiltered = array_filter(array_map('self::mapInt', $uids));
|
||||
$query = $this->createQuery();
|
||||
$query->matching($query->in('tags.uid', $uidsFiltered));
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
public function initializeObject() {
|
||||
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
|
||||
$querySettings->setRespectStoragePage(false);
|
||||
$this->setDefaultQuerySettings($querySettings);
|
||||
}
|
||||
}
|
35
Classes/Domain/Traits/InjectImageServiceTrait.php
Normal file
35
Classes/Domain/Traits/InjectImageServiceTrait.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Traits;
|
||||
|
||||
use TYPO3\CMS\Extbase\Service\ImageService;
|
||||
|
||||
/**
|
||||
* Description of InjectImageServiceTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectImageServiceTrait {
|
||||
|
||||
/**
|
||||
* imageService
|
||||
*
|
||||
* @var ImageService
|
||||
*/
|
||||
protected $imageService = null;
|
||||
/**
|
||||
* @param ImageService $imageService
|
||||
*/
|
||||
public function injectImageService(ImageService $imageService) {
|
||||
$this->imageService = $imageService;
|
||||
}
|
||||
|
||||
}
|
27
Classes/Domain/Traits/InjectMapEntryRepositoryTrait.php
Normal file
27
Classes/Domain/Traits/InjectMapEntryRepositoryTrait.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Traits;
|
||||
|
||||
use A2G\A2gTravelBlog\Domain\Repository\MapEntryRepository;
|
||||
|
||||
/**y
|
||||
* Description of InjectMapEntryRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectMapEntryRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var MapEntryRepository
|
||||
*/
|
||||
protected $mapEntryRepository = null;
|
||||
|
||||
/**
|
||||
* @param MapEntryRepository $mapEntryRepository
|
||||
*/
|
||||
public function injectMapEntryRepository(MapEntryRepository $mapEntryRepository) {
|
||||
$this->mapEntryRepository = $mapEntryRepository;
|
||||
}
|
||||
|
||||
}
|
27
Classes/Domain/Traits/InjectTravelAuthorRepositoryTrait.php
Normal file
27
Classes/Domain/Traits/InjectTravelAuthorRepositoryTrait.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Traits;
|
||||
|
||||
use A2G\A2gTravelBlog\Domain\Repository\TravelAuthorRepository;
|
||||
|
||||
/**y
|
||||
* Description of InjectTravelAuthorRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectTravelAuthorRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var TravelAuthorRepository
|
||||
*/
|
||||
protected $travelAuthorRepository = null;
|
||||
|
||||
/**
|
||||
* @param TravelAuthorRepository $travelAuthorRepository
|
||||
*/
|
||||
public function injectTravelAuthorRepository(TravelAuthorRepository $travelAuthorRepository) {
|
||||
$this->travelAuthorRepository = $travelAuthorRepository;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Traits;
|
||||
|
||||
use A2G\A2gTravelBlog\Domain\Repository\TravelCategoryRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectIngredientsRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectTravelCategoryRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var TravelCategoryRepository
|
||||
*/
|
||||
protected $travelCategoryRepository = null;
|
||||
|
||||
/**
|
||||
* @param TravelCategoryRepository $travelCategoryRepository
|
||||
*/
|
||||
public function injectTravelCategoryRepository(TravelCategoryRepository $travelCategoryRepository) {
|
||||
$this->travelCategoryRepository = $travelCategoryRepository;
|
||||
}
|
||||
|
||||
}
|
27
Classes/Domain/Traits/InjectTravelPostRepositoryTrait.php
Normal file
27
Classes/Domain/Traits/InjectTravelPostRepositoryTrait.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace A2G\A2gTravelBlog\Domain\Traits;
|
||||
|
||||
use A2G\A2gTravelBlog\Domain\Repository\TravelPostRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectIngredientsRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectTravelPostRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var TravelPostRepository
|
||||
*/
|
||||
protected $travelPostRepository = null;
|
||||
|
||||
/**
|
||||
* @param TravelPostRepository $travelPostRepository
|
||||
*/
|
||||
public function injectTravelPostRepository(TravelPostRepository $travelPostRepository) {
|
||||
$this->travelPostRepository = $travelPostRepository;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user