Differential D19307 Diff 46206 src/applications/diffusion/document/DiffusionDocumentRenderingEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/document/DiffusionDocumentRenderingEngine.php
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | final class DiffusionDocumentRenderingEngine | ||||
} | } | ||||
protected function addApplicationCrumbs( | protected function addApplicationCrumbs( | ||||
PHUICrumbsView $crumbs, | PHUICrumbsView $crumbs, | ||||
PhabricatorDocumentRef $ref = null) { | PhabricatorDocumentRef $ref = null) { | ||||
return; | return; | ||||
} | } | ||||
protected function willRenderRef(PhabricatorDocumentRef $ref) { | |||||
$ref->setSymbolMetadata($this->getSymbolMetadata()); | |||||
} | |||||
private function getSymbolMetadata() { | |||||
$drequest = $this->getDiffusionRequest(); | |||||
$repo = $drequest->getRepository(); | |||||
$symbol_repos = nonempty($repo->getSymbolSources(), array()); | |||||
$symbol_repos[] = $repo->getPHID(); | |||||
$lang = last(explode('.', $drequest->getPath())); | |||||
return array( | |||||
'repositories' => $symbol_repos, | |||||
'lang' => $lang, | |||||
'path' => $drequest->getPath(), | |||||
); | |||||
} | |||||
} | } |