<?php

namespace AdminBundle\Repository;


use Doctrine\ORM\EntityRepository;

class ContactRepository extends EntityRepository {

    public function findAllActive() {
        return $this->createQueryBuilder('c')
            ->where('c.archived = false')
            ->orderBy('c.createdAt', 'DESC')
            ->getQuery()
            ->getResult();
    }

    public function findAllArchived() {
        return $this->createQueryBuilder('c')
            ->where('c.archived = true')
            ->orderBy('c.createdAt', 'DESC')
            ->getQuery()
            ->getResult();
    }


}