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