taxRateRepository = $taxRateRepository; $this->searchCriteriaBuilder = $searchCriteriaBuilder; $this->converter = $converter; $this->rateProvider = $rateProvider ?: ObjectManager::getInstance()->get(RateProvider::class); } /** * Retrieve all tax rates as an options array. * * @return array */ public function toOptionArray() { if (!$this->options) { $searchCriteria = $this->searchCriteriaBuilder ->setPageSize($this->rateProvider->getPageSize()) ->setCurrentPage(1) ->create(); $this->options = $this->rateProvider->toOptionArray($searchCriteria); } return $this->options; } }