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.

QueryBuilder.php 596B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Lc\SovBundle\Doctrine;
  3. use Doctrine\ORM\QueryBuilder as DoctrineQueryBuilder;
  4. /**
  5. * class QueryBuilder.
  6. *
  7. * @author La clic !!!!
  8. */
  9. class QueryBuilder extends DoctrineQueryBuilder
  10. {
  11. public function andWhereParent($dqlId, $entityId):self
  12. {
  13. $this->andWhere($dqlId.'.parent = :entityId');
  14. $this->setParameter('entityId', $entityId);
  15. return $this;
  16. }
  17. public function andWhereParentIsNull($dqlId):self
  18. {
  19. $this->andWhere($dqlId.'.parent IS NULL');
  20. return $this;
  21. }
  22. /*public function andIsOnline(){
  23. }*/
  24. }