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.

UserUserGroupRepository.php 836B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace common\logic\User\UserUserGroup\Repository;
  3. use common\logic\AbstractRepository;
  4. use common\logic\User\User\Model\User;
  5. use common\logic\User\UserUserGroup\Model\UserUserGroup;
  6. class UserUserGroupRepository extends AbstractRepository
  7. {
  8. protected UserUserGroupRepositoryQuery $query;
  9. public function loadDependencies(): void
  10. {
  11. $this->loadQuery(UserUserGroupRepositoryQuery::class);
  12. }
  13. public function getDefaultOptionsSearch(): array
  14. {
  15. return [
  16. self::WITH => [],
  17. self::JOIN_WITH => [],
  18. self::ORDER_BY => '',
  19. self::ATTRIBUTE_ID_PRODUCER => ''
  20. ];
  21. }
  22. public function findUserUserGroupsByUser(User $user)
  23. {
  24. return $this->createDefaultQuery()
  25. ->filterByUser($user)
  26. ->find();
  27. }
  28. }