Xpressengine\Site\SiteHandler::getHomeInstanceId PHP Méthode

getHomeInstanceId() public méthode

getHomeInstanceId
public getHomeInstanceId ( null | string $siteKey = null ) : string
$siteKey null | string site key
Résultat string
    public function getHomeInstanceId($siteKey = null)
    {
        if (is_null($siteKey)) {
            $siteKey = $this->currentSite->siteKey;
        }
        return $this->config->getVal(sprintf("site.%s.homeInstance", $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::getHomeInstanceId