public function WorkbenchPreprocess::preprocessNode in Workbench Moderation 8
Same name and namespace in other branches
- 8.2 src/WorkbenchPreprocess.php \Drupal\workbench_moderation\WorkbenchPreprocess::preprocessNode()
Wrapper for hook_preprocess_HOOK().
Parameters
array $variables: Theme variables to preprocess.
File
- src/
WorkbenchPreprocess.php, line 36
Class
- WorkbenchPreprocess
- Service to determine whether a route is the "Latest version" tab of a node.
Namespace
Drupal\workbench_moderationCode
public function preprocessNode(array &$variables) {
// Set the 'page' template variable when the node is being displayed on the
// "Latest version" tab provided by workbench_moderation.
$variables['page'] = $variables['page'] || $this
->isLatestVersionPage($variables['node']);
}