public function FacetapiAdapter::getSearchPath in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/adapter.inc \FacetapiAdapter::getSearchPath()
- 7 plugins/facetapi/adapter.inc \FacetapiAdapter::getSearchPath()
Returns the search path.
@todo D8 should provide an API function for this.
Return value
string A string containing the search path.
File
- plugins/
facetapi/ adapter.inc, line 337 - Adapter plugin and adapter related calsses.
Class
- FacetapiAdapter
- Abstract class extended by search backends that retrieves facet information from the database.
Code
public function getSearchPath() {
if (NULL === $this->searchPath) {
// Backwards compatibility with apachesolr <= beta8.
// @see http://drupal.org/node/1305748#comment-5102352
foreach (array(
$this->info['module'],
$this->info['module'] . '_search',
) as $module) {
if ($path = module_invoke($module, 'search_info')) {
$this->searchPath = 'search/' . $path['path'];
if (!isset($_GET['keys']) && ($keys = $this
->getSearchKeys())) {
$this->searchPath .= '/' . $keys;
}
break;
}
}
}
return $this->searchPath;
}