node = $node; } /** * {@inheritdoc} */ public function getRuntimeContexts(array $unqualified_context_ids) { $context = EntityContext::fromEntity($this->node); return ['@node.node_route_context:node' => $context]; } /** * {@inheritdoc} */ public function getAvailableContexts() { $context = EntityContext::fromEntityTypeId('node', $this->t('Node from entity hook')); return ['@node.node_route_context:node' => $context]; } }