You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DocumentRepositoryQuery.php 935B

3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
3 vuotta sitten
12345678910111213141516171819202122232425262728293031
  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 SectionRepositoryQueryTrait;
  11. public function __construct(DocumentRepository $repository, PaginatorInterface $paginator)
  12. {
  13. parent::__construct($repository, 'r', $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. }