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.

SectionRepositoryQuery.php 787B

3 anni fa
3 anni fa
3 anni fa
3 anni fa
3 anni fa
3 anni fa
1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Section;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
  5. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  6. class SectionRepositoryQuery extends AbstractRepositoryQuery
  7. {
  8. use MerchantRepositoryQueryTrait;
  9. public function __construct(SectionRepository $repository, PaginatorInterface $paginator)
  10. {
  11. parent::__construct($repository, 'section', $paginator);
  12. }
  13. public function filterByIsDefault(bool $isDefault)
  14. {
  15. return $this->andWhereEqual('isDefault', $isDefault);
  16. }
  17. public function filterIsOnlineFrontend()
  18. {
  19. return $this->filterIsOnline()
  20. && $this->andWhereEqual('isOnlineFrontend', true);
  21. }
  22. }