Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/controller/PhabricatorFileInfoController.php
Show First 20 Lines • Show All 417 Lines • ▼ Show 20 Lines | private function newFileContent(PhabricatorFile $file) { | ||||
$views = array(); | $views = array(); | ||||
foreach ($engines as $candidate_engine) { | foreach ($engines as $candidate_engine) { | ||||
$label = $candidate_engine->getViewAsLabel($ref); | $label = $candidate_engine->getViewAsLabel($ref); | ||||
if ($label === null) { | if ($label === null) { | ||||
continue; | continue; | ||||
} | } | ||||
$view_icon = $candidate_engine->getViewAsIconIcon($ref); | $view_icon = $candidate_engine->getViewAsIconIcon($ref); | ||||
$view_color = $candidate_engine->getViewAsIconColor($ref); | |||||
$views[] = array( | $views[] = array( | ||||
'viewKey' => $candidate_engine->getDocumentEngineKey(), | 'viewKey' => $candidate_engine->getDocumentEngineKey(), | ||||
'icon' => $view_icon, | 'icon' => $view_icon, | ||||
'color' => $view_color, | |||||
'name' => $label, | 'name' => $label, | ||||
'engineURI' => $candidate_engine->getRenderURI($ref), | 'engineURI' => $candidate_engine->getRenderURI($ref), | ||||
); | ); | ||||
} | } | ||||
Javelin::initBehavior('document-engine'); | Javelin::initBehavior('document-engine'); | ||||
$viewport_id = celerity_generate_unique_node_id(); | $viewport_id = celerity_generate_unique_node_id(); | ||||
Show All 36 Lines |