Path: blob/master/src/applications/config/module/PhabricatorConfigPHIDModule.php
12256 views
<?php12final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule {34public function getModuleKey() {5return 'phid';6}78public function getModuleName() {9return pht('PHID Types');10}1112public function renderModuleStatus(AphrontRequest $request) {13$viewer = $request->getViewer();1415$types = PhabricatorPHIDType::getAllTypes();16$types = msort($types, 'getTypeConstant');1718$rows = array();19foreach ($types as $key => $type) {20$class_name = $type->getPHIDTypeApplicationClass();21if ($class_name !== null) {22$app = PhabricatorApplication::getByClass($class_name);23$app_name = $app->getName();2425$icon = $app->getIcon();26if ($icon) {27$app_icon = id(new PHUIIconView())->setIcon($icon);28} else {29$app_icon = null;30}31} else {32$app_name = null;33$app_icon = null;34}3536$icon = $type->getTypeIcon();37if ($icon) {38$type_icon = id(new PHUIIconView())->setIcon($icon);39} else {40$type_icon = null;41}4243$rows[] = array(44$type->getTypeConstant(),45get_class($type),46$app_icon,47$app_name,48$type_icon,49$type->getTypeName(),50);51}5253return id(new AphrontTableView($rows))54->setHeaders(55array(56pht('Constant'),57pht('Class'),58null,59pht('Application'),60null,61pht('Name'),62))63->setColumnClasses(64array(65null,66'pri',67'icon',68null,69'icon',70'wide',71));72}7374}757677