You are here

public function PageEventVariables::isNodePage in Hook Event Dispatcher 8

Is the current page a rendering a node?.

Return value

bool Is it?

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

File

src/Event/Preprocess/Variables/PageEventVariables.php, line 18

Class

PageEventVariables
Class PageEventVariables.

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Variables

Code

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