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