Returns the path used for requests to the Solr server

plugin.tx_solr.solr.path

Applies stdWrap on the configured setting

@param string $defaultIfEmpty
@param string $scope read or write, read by default
@return string
962625
public function getSolrPath($defaultIfEmpty = '/solr/core_en/', $scope = 'read')
    {
        $scopePath = 'plugin.tx_solr.solr.' . $scope . '.path';
        $fallbackPath = 'plugin.tx_solr.solr.path';

        $solrPath =  $this->getValueByPathWithFallbackOrDefaultValueAndApplyStdWrap($scopePath, $fallbackPath, $defaultIfEmpty);

        $solrPath = trim($solrPath, '/');
        $solrPath = '/' . $solrPath . '/';

        return $solrPath;
    }
608586
public function getViewTemplateByFileKey($fileKey, $defaultIfEmpty = '')
    {
        $templateFileName = $this->getValueByPathOrDefaultValue('plugin.tx_solr.view.templateFiles.' . $fileKey, $defaultIfEmpty);
        return (string)$templateFileName;
    }
613882
public static function findByPath(string $path, array $scope)
    {
        if (mb_strpos($path, ':')) {
            foreach (explode(':', $path) as $i => $key) {
                if (!isset($scope[$key])) {
                    return null;
                }
                $scope = $scope[$key];
            }
            return $scope;
        }
        return $scope[$path] ?? null;
    }
236625
public function getSearchFrequentSearchesUseLowercaseKeywords($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.frequentSearches.useLowercaseKeywords', $defaultIfEmpty);
        return $this->getBool($result);
    }
631549
public function getSearchVariantsExpand($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.variants.expand', $defaultIfEmpty);
        return $this->getBool($result);
    }
749934
public function getSearchElevation($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.elevation', $defaultIfEmpty);
        return $this->getBool($result);
    }
1159496
public function getStatisticsAddDebugData($defaultIfEmpty = false)
    {
        $statisticsAddDebugDataEnabled = $this->getValueByPathOrDefaultValue('plugin.tx_solr.statistics.addDebugData', $defaultIfEmpty);
        return $this->getBool($statisticsAddDebugDataEnabled);
    }
722117
public function getSearchShowResultsOfInitialEmptyQuery($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.showResultsOfInitialEmptyQuery', $defaultIfEmpty);
        return $this->getBool($result);
    }
1369888
public function getSearchResultsPerPageSwitchOptionsAsArray($defaultIfEmpty = [])
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.results.resultsPerPageSwitchOptions', '');

        if (trim($result) === '') {
            return $defaultIfEmpty;
        }

        return GeneralUtility::intExplode(',', $result, true);
    }
1166797
public function getSearchResultsSiteHighlighting($defaultIfEmpty = true)
    {
        $isSiteHightlightingEnabled = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.results.siteHighlighting', $defaultIfEmpty);
        return $this->getBool($isSiteHightlightingEnabled);
    }
753885
public function getLoggingIndexingIndexQueueInitialization($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.logging.indexing.indexQueueInitialization', $defaultIfEmpty);
        return $this->getBool($result);
    }
1093628
public function getScopeValue($scope, $default = null)
    {
        if (is_string($scope)) {
            $scope = $this->getScope($scope);
        }

        $cacheKey = 'scope-'.$scope->scopeName;
        return $this->getSession($cacheKey, $default);
    }
240667
public function read($scope = null)
    {
        $scope = $scope === null ? ContainerScopeInterface::SCOPE_DEFAULT : $scope;
        if ($scope !== ContainerScopeInterface::SCOPE_DEFAULT) {
            throw new \Magento\Framework\Exception\LocalizedException(__("Only default scope allowed"));
        }

        $config = $this->initialConfig->getData($scope);

        $collection = $this->collectionFactory->create(
            ['scope' => $scope]
        );

        $dbDefaultConfig = [];
        foreach ($collection as $item) {
            $dbDefaultConfig[$item->getPath()] = $item->getValue();
        }

        $dbDefaultConfig = $this->converter->convert($dbDefaultConfig);
        $config = array_replace_recursive($config, $dbDefaultConfig);

        return $config;
    }
1022322
public function getBigramPhraseSearchIsEnabled(bool $defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.query.bigramPhrase', $defaultIfEmpty);
        return $this->getBool($result);
    }
493438
public static function request($key = null, $defaultValue = null)
    {
        if ($key == null) {
            return $_REQUEST;
        }
        $req = static::getInstance();
        if ($req->query->has($key)) {
            return $req->query->get($key);
        } else {
            if ($req->request->has($key)) {
                return $req->request->get($key);
            }
        }

        return $defaultValue;
    }
837548
public function getSearchSpellcheckingSearchUsingSpellCheckerSuggestion($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.spellchecking.searchUsingSpellCheckerSuggestion', $defaultIfEmpty);
        return $this->getBool($result);
    }
1094766
public function getLoggingQueryQueryString($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.logging.query.queryString', $defaultIfEmpty);
        return $this->getBool($result);
    }