SearchApiPage.php in Search API Pages 8
Same filename in this branch
File
src/Plugin/search_api/display/SearchApiPage.phpView source
<?php
namespace Drupal\search_api_page\Plugin\search_api\display;
use Drupal\search_api\Display\DisplayPluginBase;
/**
* Represents a Search API Pages search display.
*
* @SearchApiDisplay(
* id = "search_api_page",
* deriver = "Drupal\search_api_page\Plugin\search_api\display\SearchApiPageDeriver"
* )
*/
class SearchApiPage extends DisplayPluginBase {
/**
* {@inheritdoc}
*/
public function isRenderedInCurrentRequest() {
if ($path = $this
->getPath()) {
$current_path = $this
->getCurrentPath()
->getPath();
return strpos($current_path, $path) !== FALSE;
}
return FALSE;
}
}
Classes
Name | Description |
---|---|
SearchApiPage | Represents a Search API Pages search display. |