From 58957e62c1fa58bd180f187ed41d271343b26195 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 24 Oct 2015 08:16:23 -0700 Subject: [PATCH] Show applications and icons for PHID types in config table Summary: Ref T9625. Some PHID types are missing application or icon specifications. This makes it easier to spot them. Test Plan: {F906321} Reviewers: chad Reviewed By: chad Maniphest Tasks: T9625 Differential Revision: https://secure.phabricator.com/D14323 --- .../module/PhabricatorConfigPHIDModule.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/applications/config/module/PhabricatorConfigPHIDModule.php b/src/applications/config/module/PhabricatorConfigPHIDModule.php index 6c363e3bee..4c5c09f9c3 100644 --- a/src/applications/config/module/PhabricatorConfigPHIDModule.php +++ b/src/applications/config/module/PhabricatorConfigPHIDModule.php @@ -18,9 +18,35 @@ final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule { $rows = array(); foreach ($types as $key => $type) { + $class_name = $type->getPHIDTypeApplicationClass(); + if ($class_name !== null) { + $app = PhabricatorApplication::getByClass($class_name); + $app_name = $app->getName(); + + $icon = $app->getFontIcon(); + if ($icon) { + $app_icon = id(new PHUIIconView())->setIconFont($icon); + } else { + $app_icon = null; + } + } else { + $app_name = null; + $app_icon = null; + } + + $icon = $type->getTypeIcon(); + if ($icon) { + $type_icon = id(new PHUIIconView())->setIconFont($icon); + } else { + $type_icon = null; + } + $rows[] = array( $type->getTypeConstant(), get_class($type), + $app_icon, + $app_name, + $type_icon, $type->getTypeName(), ); } @@ -30,12 +56,18 @@ final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule { array( pht('Constant'), pht('Class'), + null, + pht('Application'), + null, pht('Name'), )) ->setColumnClasses( array( null, 'pri', + 'icon', + null, + 'icon', 'wide', ));