Smile\ElasticsuiteCore\Model\Search\Request\RelevanceConfig::initScope PHP Method

initScope() private method

Get scope name and scopeId
private initScope ( ) : void
return void
    private function initScope()
    {
        if ($this->getSection() === null) {
            $this->setSection('');
        }
        if ($this->getContainer() === null) {
            $this->setContainer('');
        }
        if ($this->getStore() === null) {
            $this->setStore('');
        }
        $scope = 'default';
        $scopeCode = 'default';
        if ($this->getStore()) {
            $scope = 'containers_stores';
            $store = $this->_storeManager->getStore($this->getStore());
            $scopeCode = $store->getId();
            if ($this->getContainer() && $this->getContainer() != "") {
                $scopeCode = $this->getContainer() . "|" . $scopeCode;
            }
        } elseif ($this->getContainer()) {
            $scope = 'containers';
            $container = $this->containersSource->get($this->getContainer());
            $scopeCode = $container['name'];
        }
        $this->setScope($scope);
        $this->setScopeCode($scopeCode);
    }