query = $query; } public function getAsArray(MerchantInterface $merchant) { $taxRates = $this->query->create()->find(); $taxRatesList = []; foreach ($taxRates as $taxRate) { $taxRatesList[$taxRate->getId()]['title'] = $taxRate->getTitle(); $taxRatesList[$taxRate->getId()]['value'] = $taxRate->getValue(); } $taxRatesList['default']['title'] = $merchant->getTaxRate()->getTitle(); $taxRatesList['default']['value'] = $merchant->getTaxRate()->getValue(); return $taxRatesList; } }