您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
627B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository;
  3. trait StatusRepositoryQueryTrait
  4. {
  5. public function filterByStatus(int $status):self
  6. {
  7. return $this->andWhere('.status = :status')->setParameter(':status', $status);
  8. }
  9. public function filterIsOffline():self
  10. {
  11. return $this->andWhere('.status = :status')->setParameter(':status', 0);
  12. }
  13. public function filterIsOnline():self
  14. {
  15. return $this->andWhere('.status = :status')->setParameter(':status', 1);
  16. }
  17. public function filterIsOnlineAndOffline():self
  18. {
  19. return $this->andWhere('.status >= 0');
  20. }
  21. }