<?php
/**
 * MetaTagSet Repository
 * 
 * @author Visual Media 
 */
namespace VisualM\TagManagerBundle\Entity;

use VisualM\TagManagerBundle\Model\MetaTagSetManager;
use Doctrine\ORM\QueryBuilder;
use VisualM\ModelManagementBundle\Definition\ModelManagerInterface;

/**
 * MetaTagSet Repository
 * 
 * @author Visual Media 
 */
class MetaTagSetRepository extends MetaTagSetManager implements ModelManagerInterface
{
    /**
     * {@inheritDoc}
     */
    protected function processConditions(array $options, QueryBuilder &$qb)
    {
        foreach($options as $option => $value) {
            if ($option == 'id') {
                $qb->andWhere($qb->expr()->eq($this->getFullFieldName('id'), $qb->expr()->literal($value)));
            } else if ($option == 'kiesbaar') {
                $qb->andWhere($qb->expr()->eq($this->getFullFieldName('kiesbaar'), $qb->expr()->literal($value)));
            }
        }
    }
    
}
