vendor/shopware/storefront/Pagelet/Header/HeaderPagelet.php line 15

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Storefront\Pagelet\Header;
  3. use Shopware\Core\Content\Category\CategoryCollection;
  4. use Shopware\Core\Content\Category\Tree\Tree;
  5. use Shopware\Core\Framework\Log\Package;
  6. use Shopware\Core\System\Currency\CurrencyCollection;
  7. use Shopware\Core\System\Currency\CurrencyEntity;
  8. use Shopware\Core\System\Language\LanguageCollection;
  9. use Shopware\Core\System\Language\LanguageEntity;
  10. use Shopware\Storefront\Pagelet\NavigationPagelet;
  11. #[Package('storefront')]
  12. class HeaderPagelet extends NavigationPagelet
  13. {
  14.     /**
  15.      * @var LanguageCollection
  16.      */
  17.     protected $languages;
  18.     /**
  19.      * @var CurrencyCollection
  20.      */
  21.     protected $currencies;
  22.     /**
  23.      * @var LanguageEntity
  24.      */
  25.     protected $activeLanguage;
  26.     /**
  27.      * @var CurrencyEntity
  28.      */
  29.     protected $activeCurrency;
  30.     /**
  31.      * @var CategoryCollection
  32.      */
  33.     protected $serviceMenu;
  34.     /**
  35.      * @internal
  36.      */
  37.     public function __construct(
  38.         Tree $navigation,
  39.         LanguageCollection $languages,
  40.         CurrencyCollection $currencies,
  41.         LanguageEntity $activeLanguage,
  42.         CurrencyEntity $activeCurrency,
  43.         CategoryCollection $serviceMenu
  44.     ) {
  45.         $this->languages $languages;
  46.         $this->currencies $currencies;
  47.         $this->activeLanguage $activeLanguage;
  48.         $this->activeCurrency $activeCurrency;
  49.         $this->serviceMenu $serviceMenu;
  50.         parent::__construct($navigation);
  51.     }
  52.     public function getLanguages(): LanguageCollection
  53.     {
  54.         return $this->languages;
  55.     }
  56.     public function getCurrencies(): CurrencyCollection
  57.     {
  58.         return $this->currencies;
  59.     }
  60.     public function getActiveLanguage(): LanguageEntity
  61.     {
  62.         return $this->activeLanguage;
  63.     }
  64.     public function getActiveCurrency(): CurrencyEntity
  65.     {
  66.         return $this->activeCurrency;
  67.     }
  68.     public function getServiceMenu(): CategoryCollection
  69.     {
  70.         return $this->serviceMenu;
  71.     }
  72. }