You are here

public function DisplayPluginBase::isRenderedInCurrentRequest in Search API 8

Returns true if the display is being rendered in the current request.

Return value

bool True when the display is rendered in the current request.

Overrides DisplayInterface::isRenderedInCurrentRequest

1 method overrides DisplayPluginBase::isRenderedInCurrentRequest()
ViewsDisplayBase::isRenderedInCurrentRequest in src/Plugin/search_api/display/ViewsDisplayBase.php
Returns true if the display is being rendered in the current request.

File

src/Display/DisplayPluginBase.php, line 161

Class

DisplayPluginBase
Defines a base class from which other display classes may extend.

Namespace

Drupal\search_api\Display

Code

public function isRenderedInCurrentRequest() {
  if ($path = $this
    ->getPath()) {
    $current_path = $this
      ->getCurrentPath()
      ->getPath();
    return $current_path == $path;
  }
  return FALSE;
}