Your IP : 216.73.216.52


Current Path : /proc/thread-self/root/var/www/surf/TYPO3/src/surf/Classes/Domain/Repository/
Upload File :
Current File : //proc/thread-self/root/var/www/surf/TYPO3/src/surf/Classes/Domain/Repository/LogRepository.php

<?php

declare(strict_types=1);

namespace Torresani\Surf\Domain\Repository;


/**
 * This file is part of the "surf" 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) 2023 
 */

/**
 * The repository for Logs
 */
class LogRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
    /**
     * @param string $code
     * @param string $type
     * @return mixed|object|null
     */
    public function findAllByCodeAndType(string $code, string $type)
    {
        $query = $this->createQuery();
        $query->matching(
            $query->logicalAnd(

                    $query->equals('code', $code),
                    $query->equals('type', $type)

            )
        );
        $query->setOrderings(
            [
                'date' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
            ]
        );
        return $query->execute();

    }

}