<?php

namespace UserBundle\Repository;

use Doctrine\ORM\EntityRepository;
use UserBundle\Entity\Notification\NotificationTheme;

/**
 * NotificationThemeRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class NotificationThemeRepository extends EntityRepository
{

    /**
     * Get default notification theme.
     *
     * @return NotificationTheme|null
     */
    public function getDefault()
    {
        return $this->createQueryBuilder('Theme')
            ->where('Theme.default = 1')
            ->getQuery()
            ->getOneOrNullResult();
    }
}
