public function PageEventVariables::isNodePage in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x 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\VariablesCode
public function isNodePage() : bool {
return isset($this->variables['node']) && $this->variables['node'] instanceof NodeInterface;
}