Xpressengine\Site\SiteHandler::getCurrentSiteKey PHP Method

getCurrentSiteKey() public method

getCurrentSiteKey
public getCurrentSiteKey ( ) : string
return string
    public function getCurrentSiteKey()
    {
        return $this->currentSite->siteKey;
    }

Usage Example

 public function editSetting(SiteHandler $siteHandler, MenuHandler $menuHandler)
 {
     $config = app('xe.site')->getSiteConfig();
     $siteKey = $siteHandler->getCurrentSiteKey();
     $indexInstance = $siteHandler->getHomeInstanceId();
     $menus = $menuHandler->getAll($siteKey, 'items');
     return \XePresenter::make('settings.setting', compact('config', 'menus', 'indexInstance'));
 }
All Usage Examples Of Xpressengine\Site\SiteHandler::getCurrentSiteKey