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.

33 lines
735B

  1. <?php
  2. namespace common\logic\Config\TaxRate;
  3. use common\logic\BaseService;
  4. use common\logic\RepositoryInterface;
  5. class TaxRateRepository extends BaseService implements RepositoryInterface
  6. {
  7. public function defaultOptionsSearch(): array
  8. {
  9. return [
  10. 'with' => [],
  11. 'join_with' => [],
  12. 'orderby' => 'pourcent ASC',
  13. 'attribute_id_producer' => ''
  14. ] ;
  15. }
  16. // getTaxRateArray
  17. public function getAsArray(): array
  18. {
  19. $taxRateArrayReturn = [];
  20. $taxRateArray = TaxRate::find()->all();
  21. foreach($taxRateArray as $taxRate) {
  22. $taxRateArrayReturn[$taxRate->id] = $taxRate;
  23. }
  24. return $taxRateArrayReturn;
  25. }
  26. }