1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-09 14:21:02 +01:00
phorge-phorge/src/applications/search/engineextension/PhabricatorHovercardEngineExtensionModule.php

56 lines
1.2 KiB
PHP
Raw Normal View History

<?php
final class PhabricatorHovercardEngineExtensionModule
extends PhabricatorConfigModule {
public function getModuleKey() {
return 'hovercardengine';
}
public function getModuleName() {
return pht('Engine: Hovercards');
}
public function renderModuleStatus(AphrontRequest $request) {
$viewer = $request->getViewer();
$extensions = PhabricatorHovercardEngineExtension::getAllExtensions();
$rows = array();
foreach ($extensions as $extension) {
$rows[] = array(
$extension->getExtensionOrder(),
$extension->getExtensionKey(),
get_class($extension),
$extension->getExtensionName(),
$extension->isExtensionEnabled()
? pht('Yes')
: pht('No'),
);
}
$table = id(new AphrontTableView($rows))
->setHeaders(
array(
pht('Order'),
pht('Key'),
pht('Class'),
pht('Name'),
pht('Enabled'),
))
->setColumnClasses(
array(
null,
null,
null,
'wide pri',
null,
));
return id(new PHUIObjectBoxView())
->setHeaderText(pht('HovercardEngine Extensions'))
->setTable($table);
}
}