@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 39 lines 953 B view raw
1<?php 2 3abstract class DivinerController extends PhabricatorController { 4 5 public function buildApplicationMenu() { 6 return $this->newApplicationMenu() 7 ->setSearchEngine(new DivinerAtomSearchEngine()); 8 } 9 10 /** 11 * @param array<DivinerLiveSymbol> $symbols 12 */ 13 protected function renderAtomList(array $symbols) { 14 assert_instances_of($symbols, DivinerLiveSymbol::class); 15 16 $list = array(); 17 foreach ($symbols as $symbol) { 18 switch ($symbol->getType()) { 19 case DivinerAtom::TYPE_FUNCTION: 20 $title = $symbol->getTitle().'()'; 21 break; 22 default: 23 $title = $symbol->getTitle(); 24 break; 25 } 26 27 $item = id(new DivinerBookItemView()) 28 ->setTitle($title) 29 ->setHref($symbol->getURI()) 30 ->setSubtitle($symbol->getSummary()) 31 ->setType(DivinerAtom::getAtomTypeNameString($symbol->getType())); 32 33 $list[] = $item; 34 } 35 36 return $list; 37 } 38 39}