mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
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
This commit is contained in:
parent
b3d8ea88ec
commit
58957e62c1
1 changed files with 32 additions and 0 deletions
|
@ -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',
|
||||
));
|
||||
|
||||
|
|
Loading…
Reference in a new issue