Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/contentsource/PhabricatorContentSourceModule.php
12241 views
1
<?php
2
3
final class PhabricatorContentSourceModule
4
extends PhabricatorConfigModule {
5
6
public function getModuleKey() {
7
return 'contentsource';
8
}
9
10
public function getModuleName() {
11
return pht('Content Sources');
12
}
13
14
public function renderModuleStatus(AphrontRequest $request) {
15
$viewer = $request->getViewer();
16
17
$sources = PhabricatorContentSource::getAllContentSources();
18
ksort($sources);
19
20
$rows = array();
21
foreach ($sources as $source) {
22
$rows[] = array(
23
$source->getSourceTypeConstant(),
24
get_class($source),
25
$source->getSourceName(),
26
$source->getSourceDescription(),
27
);
28
}
29
30
return id(new AphrontTableView($rows))
31
->setHeaders(
32
array(
33
pht('Key'),
34
pht('Class'),
35
pht('Source'),
36
pht('Description'),
37
))
38
->setColumnClasses(
39
array(
40
null,
41
null,
42
'pri',
43
'wide',
44
));
45
46
}
47
48
}
49
50