You are here

public function PageEventVariables::isNodePage in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/src/Variables/PageEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\PageEventVariables::isNodePage()

Is the current page a rendering a node?.

Return value

bool Is it?

1 call to PageEventVariables::isNodePage()
PageEventVariables::getNode in modules/preprocess_event_dispatcher/src/Variables/PageEventVariables.php
Get the node of the page.

File

modules/preprocess_event_dispatcher/src/Variables/PageEventVariables.php, line 18

Class

PageEventVariables
Class PageEventVariables.

Namespace

Drupal\preprocess_event_dispatcher\Variables

Code

public function isNodePage() : bool {
  return isset($this->variables['node']) && $this->variables['node'] instanceof NodeInterface;
}