node = $node; } /** * {@inheritdoc} */ public function getRuntimeContexts(array $unqualified_context_ids) { $context_definition = new ContextDefinition('entity:node', NULL, FALSE); $context = new Context($context_definition, $this->node); return ['@node.node_route_context:node' => $context]; } /** * {@inheritdoc} */ public function getAvailableContexts() { $context = new Context(new ContextDefinition('entity:node', $this->t('Node from entity hook'))); return ['@node.node_route_context:node' => $context]; } }