|
- <?php
-
- namespace common\logic\Config\TaxRate;
-
- use common\logic\BaseService;
- use common\logic\RepositoryInterface;
-
- class TaxRateRepository extends BaseService implements RepositoryInterface
- {
-
- public function defaultOptionsSearch(): array
- {
- return [
- 'with' => [],
- 'join_with' => [],
- 'orderby' => 'pourcent ASC',
- 'attribute_id_producer' => ''
- ] ;
- }
-
- // getTaxRateArray
- public function getAsArray(): array
- {
- $taxRateArrayReturn = [];
- $taxRateArray = TaxRate::find()->all();
-
- foreach($taxRateArray as $taxRate) {
- $taxRateArrayReturn[$taxRate->id] = $taxRate;
- }
-
- return $taxRateArrayReturn;
- }
- }
|