Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/controller/DivinerAtomController.php
| Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | $document = id(new PHUIDocumentView()) | ||||
| ->setHeader($header) | ->setHeader($header) | ||||
| ->addClass('diviner-view') | ->addClass('diviner-view') | ||||
| ->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS) | ->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS) | ||||
| ->appendChild($properties); | ->appendChild($properties); | ||||
| if ($atom) { | if ($atom) { | ||||
| $this->buildDefined($properties, $symbol); | $this->buildDefined($properties, $symbol); | ||||
| $this->buildExtendsAndImplements($properties, $symbol); | $this->buildExtendsAndImplements($properties, $symbol); | ||||
| $this->buildRepository($properties, $symbol); | |||||
| $warnings = $atom->getWarnings(); | $warnings = $atom->getWarnings(); | ||||
| if ($warnings) { | if ($warnings) { | ||||
| $warnings = id(new PHUIInfoView()) | $warnings = id(new PHUIInfoView()) | ||||
| ->setErrors($warnings) | ->setErrors($warnings) | ||||
| ->setTitle(pht('Documentation Warnings')) | ->setTitle(pht('Documentation Warnings')) | ||||
| ->setSeverity(PHUIInfoView::SEVERITY_WARNING); | ->setSeverity(PHUIInfoView::SEVERITY_WARNING); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | if ($implements) { | ||||
| } | } | ||||
| $view->addProperty( | $view->addProperty( | ||||
| pht('Implements'), | pht('Implements'), | ||||
| phutil_implode_html(phutil_tag('br'), $items)); | phutil_implode_html(phutil_tag('br'), $items)); | ||||
| } | } | ||||
| } | } | ||||
| private function buildRepository( | |||||
| PHUIPropertyListView $view, | |||||
| DivinerLiveSymbol $symbol) { | |||||
| $view->addProperty( | |||||
| pht('Repository'), | |||||
| $this->getViewer()->renderHandle($symbol->getRepositoryPHID())); | |||||
| } | |||||
| private function renderAtomTag(DivinerLiveSymbol $symbol) { | private function renderAtomTag(DivinerLiveSymbol $symbol) { | ||||
| return id(new PHUITagView()) | return id(new PHUITagView()) | ||||
| ->setType(PHUITagView::TYPE_OBJECT) | ->setType(PHUITagView::TYPE_OBJECT) | ||||
| ->setName($symbol->getName()) | ->setName($symbol->getName()) | ||||
| ->setHref($symbol->getURI()); | ->setHref($symbol->getURI()); | ||||
| } | } | ||||
| private function getExtendsLineage(DivinerLiveSymbol $symbol) { | private function getExtendsLineage(DivinerLiveSymbol $symbol) { | ||||
| ▲ Show 20 Lines • Show All 379 Lines • Show Last 20 Lines | |||||