|
1234567891011121314151617181920212223242526 |
- <?php
-
- namespace Lc\CaracoleBundle\Repository;
-
- trait StatusRepositoryQueryTrait
- {
- public function filterByStatus(int $status):self
- {
- return $this->andWhere('.status = :status')->setParameter(':status', $status);
- }
-
- public function filterIsOffline():self
- {
- return $this->andWhere('.status = :status')->setParameter(':status', 0);
- }
-
- public function filterIsOnline():self
- {
- return $this->andWhere('.status = :status')->setParameter(':status', 1);
- }
-
- public function filterIsOnlineAndOffline():self
- {
- return $this->andWhere('.status >= 0');
- }
- }
|