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.

27 lines
573B

  1. <?php
  2. namespace common\logic\Setting;
  3. use common\logic\AbstractRepositoryQuery;
  4. class SettingRepositoryQuery extends AbstractRepositoryQuery
  5. {
  6. protected SettingDefinition $definition;
  7. public function loadDependencies(): void
  8. {
  9. $this->loadDefinition(SettingDefinition::class);
  10. }
  11. public function filterProducerIsNull(): self
  12. {
  13. $this->andWhere(['id_producer' => null]);
  14. return $this;
  15. }
  16. public function filterByName(string $name): self
  17. {
  18. $this->andWhere(['name' => $name]);
  19. return $this;
  20. }
  21. }