No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

35 líneas
732B

  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 andWhereStatus($dqlId, $status){
  23. $this->andWhere($dqlId.'.status = :status');
  24. $this->setParameter('status', $status);
  25. return $this;
  26. }
  27. }