<?php
namespace Newland\Toubiz\Sync\Neos\Domain\Repository;

/*
 * This file is part of the "toubiz-sync-neos" package.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 */

use Doctrine\ORM\QueryBuilder;
use Neos\Flow\Annotations as Flow;
use Newland\Toubiz\Sync\Neos\Domain\Filter\FilterInterface;
use Newland\Toubiz\Sync\Neos\Domain\Model\EventTag;
use Newland\Toubiz\Sync\Neos\Translation\TranslatableRepository;

/**
 * Event Tag repository.
 *
 * @Flow\Scope("singleton")
 *
 * @method EventTag|null findOneByOriginalId(string $originalId)
 * @method EventTag|null findByIdentifier(string $identifier)
 */
class EventTagRepository extends AbstractRepository
{
    use TranslatableRepository;

    /** @var string */
    protected $alias = 'eventTag';

    /**
     * Applies filter functions (from the event tag filter) onto
     * the given query builder.
     *
     * @param FilterInterface $filter
     * @param QueryBuilder $query
     * @return QueryBuilder
     */
    protected function applyFilter(FilterInterface $filter, QueryBuilder $query): QueryBuilder
    {
        //TODO

        $this->applyBasicFilter($filter, $query);


        return $query;
    }
}
