Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

32 rindas
943B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\File;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Model\Address\AddressInterface;
  5. use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
  6. use Lc\CaracoleBundle\Repository\SectionRepositoryQueryTrait;
  7. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  8. class DocumentRepositoryQuery extends AbstractRepositoryQuery
  9. {
  10. use MerchantRepositoryQueryTrait;
  11. public function __construct(DocumentRepository $repository, PaginatorInterface $paginator)
  12. {
  13. parent::__construct($repository, 'document', $paginator);
  14. }
  15. public function filterByType($type)
  16. {
  17. return $this->andWhereEqual('type', $type);
  18. }
  19. public function filterByBuyerAddress(AddressInterface $buyerAddress)
  20. {
  21. return $this
  22. ->andWhere('.buyerAddress = :buyerAddress')
  23. ->setParameter('buyerAddress', $buyerAddress);
  24. }
  25. }