<?php declare(strict_types=1);
namespace Shopware\Storefront\Pagelet\Header;
use Shopware\Core\Content\Category\CategoryCollection;
use Shopware\Core\Content\Category\Tree\Tree;
use Shopware\Core\System\Currency\CurrencyCollection;
use Shopware\Core\System\Currency\CurrencyEntity;
use Shopware\Core\System\Language\LanguageCollection;
use Shopware\Core\System\Language\LanguageEntity;
use Shopware\Storefront\Pagelet\NavigationPagelet;
class HeaderPagelet extends NavigationPagelet
{
/**
* @var LanguageCollection
*/
protected $languages;
/**
* @var CurrencyCollection
*/
protected $currencies;
/**
* @var LanguageEntity
*/
protected $activeLanguage;
/**
* @var CurrencyEntity
*/
protected $activeCurrency;
/**
* @var CategoryCollection
*/
protected $serviceMenu;
/**
* @internal
*/
public function __construct(
Tree $navigation,
LanguageCollection $languages,
CurrencyCollection $currencies,
LanguageEntity $activeLanguage,
CurrencyEntity $activeCurrency,
CategoryCollection $serviceMenu
) {
$this->languages = $languages;
$this->currencies = $currencies;
$this->activeLanguage = $activeLanguage;
$this->activeCurrency = $activeCurrency;
$this->serviceMenu = $serviceMenu;
parent::__construct($navigation);
}
public function getLanguages(): LanguageCollection
{
return $this->languages;
}
public function getCurrencies(): CurrencyCollection
{
return $this->currencies;
}
public function getActiveLanguage(): LanguageEntity
{
return $this->activeLanguage;
}
public function getActiveCurrency(): CurrencyEntity
{
return $this->activeCurrency;
}
public function getServiceMenu(): CategoryCollection
{
return $this->serviceMenu;
}
}