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