|
- <?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');
- }
- }
|