Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Provider.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Tax\Model\Rate;
7 
12 
17 class Provider
18 {
22  private $taxRateRepository;
23 
27  private $converter;
28 
32  private $pageSize = 100;
33 
40  public function __construct(
41  TaxRateRepositoryInterface $taxRateRepository,
42  Converter $converter
43  ) {
44  $this->taxRateRepository = $taxRateRepository;
45  $this->converter = $converter;
46  }
47 
55  {
56  $searchResults = $this->taxRateRepository->getList($searchCriteria);
57 
58  return $this->converter->toOptionArray(
59  $searchResults->getItems(),
62  );
63  }
64 
70  public function getPageSize()
71  {
72  return (int) $this->pageSize;
73  }
74 }
toOptionArray(SearchCriteriaInterface $searchCriteria)
Definition: Provider.php:54
$searchCriteria
__construct(TaxRateRepositoryInterface $taxRateRepository, Converter $converter)
Definition: Provider.php:40