43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?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);
|
|
}
|
|
}
|