src/Component/Vendor/TaxonContext.php line 26

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file has been created by developers from BitBag.
  4.  * Feel free to contact us once you face any issues or want to start
  5.  * You can find more information about us on https://bitbag.io and write us
  6.  * an email on [email protected].
  7.  */
  8. declare(strict_types=1);
  9. namespace BitBag\OpenMarketplace\Component\Vendor;
  10. use BitBag\OpenMarketplace\Component\Vendor\Repository\TaxonRepositoryInterface;
  11. use Sylius\Component\Taxonomy\Model\TaxonInterface;
  12. final class TaxonContext implements TaxonContextInterface
  13. {
  14.     private TaxonRepositoryInterface $taxonRepository;
  15.     public function __construct(TaxonRepositoryInterface $taxonRepository)
  16.     {
  17.         $this->taxonRepository $taxonRepository;
  18.     }
  19.     public function getForVendorPage(?string $slugstring $locale): ?TaxonInterface
  20.     {
  21.         return $this->taxonRepository->findForVendorPage($slug$locale);
  22.     }
  23. }