loadQuery(TaxRateRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ self::WITH => [], self::JOIN_WITH => [], self::ORDER_BY => 'pourcent ASC', self::ATTRIBUTE_ID_PRODUCER => '' ]; } public function findOneTaxRateById(int $id): ?TaxRate { return $this->createQuery() ->filterById($id) ->findOne(); } public function findTaxRates(): array { return $this->createQuery() ->find(); } public function findTaxRatesAsArray(): array { $taxRateArrayReturn = []; $taxRateArray = $this->findTaxRates(); foreach ($taxRateArray as $taxRate) { $taxRateArrayReturn[$taxRate->id] = $taxRate; } return $taxRateArrayReturn; } }