File: D:/HostingSpaces/SBogers10/topswtw.komma.pro/app/KommaApp/Shop/Menus/MenuService.php
<?php
namespace KommaApp\Shop\Menus;
class MenuService
{
/**
* @var LanguageMenu
*/
protected $languageMenu;
/**
* @var ShopMenu
*/
protected $shopMenu;
/**
* @param ShopMenu $shopMenu
* @param LanguageMenu $languageMenu
*/
public function __construct(ShopMenu $shopMenu, LanguageMenu $languageMenu)
{
$this->languageMenu = $languageMenu;
$this->shopMenu = $shopMenu;
}
public function boot()
{
$this->shopMenu->setShopId(\Shop::getId());
$this->shopMenu->setLanguageId(\Shop::getLanguageService()->getCurrentLanguageId());
$this->languageMenu->setRouteData(\Shop::getRouteData());
}
/**
* @return LanguageMenu
*/
public function getLanguageMenu()
{
return $this->languageMenu;
}
/**
* @return ShopMenu
*/
public function getShopMenu()
{
return $this->shopMenu;
}
}