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

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

/**
 * MetaTagPreset Repository
 * 
 * @author Elze Kool <info@visualmedia.nl>
 */
class MetaTagPresetRepository extends MetaTagBaseManager 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)));
            }
        }
    }
    
}
