<?php
/**
 * MetaTagSet Repository
 * 
 * @author Elze Kool <info@visualmedia.nl>
 */
namespace VisualM\TagManagerBundle\Entity;

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

/**
 * MetaTagSet Repository
 * 
 * @author Elze Kool <info@visualmedia.nl>
 */
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)));
            }
        }
    }
    
}
