function ContentPreprocess::preprocessNode
Same name in other branches
- 8.9.x core/modules/content_moderation/src/ContentPreprocess.php \Drupal\content_moderation\ContentPreprocess::preprocessNode()
- 10 core/modules/content_moderation/src/ContentPreprocess.php \Drupal\content_moderation\ContentPreprocess::preprocessNode()
- 11.x core/modules/content_moderation/src/ContentPreprocess.php \Drupal\content_moderation\ContentPreprocess::preprocessNode()
Parameters
array $variables: Theme variables to preprocess.
See also
File
-
core/
modules/ content_moderation/ src/ ContentPreprocess.php, line 49
Class
- ContentPreprocess
- Determines whether a route is the "Latest version" tab of a node.
Namespace
Drupal\content_moderationCode
public function preprocessNode(array &$variables) {
// Set the 'page' template variable when the node is being displayed on the
// "Latest version" tab provided by content_moderation.
$variables['page'] = $variables['page'] || $this->isLatestVersionPage($variables['node']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.