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.

UserPointSaleRepository.php 794B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace common\logic\PointSale\PointSale;
  3. use common\logic\BaseService;
  4. use common\logic\BuilderInterface;
  5. use common\logic\PointSale\UserPointSale\UserPointSale;
  6. use common\logic\RepositoryInterface;
  7. use common\logic\User\User\User;
  8. class UserPointSaleRepository extends BaseService implements RepositoryInterface
  9. {
  10. public function defaultOptionsSearch(): array
  11. {
  12. return [
  13. 'with' => [],
  14. 'join_with' => [],
  15. 'orderby' => '',
  16. 'attribute_id_producer' => ''
  17. ] ;
  18. }
  19. public function getOne(User $user, PointSale $pointSale)
  20. {
  21. return UserPointSale::find()
  22. ->where([
  23. 'id_user' => $user->id,
  24. 'id_point_sale' => $pointSale->id
  25. ])->one();
  26. }
  27. }