Page MenuHomec4science

PhabricatorContentSourceModule.php
No OneTemporary

File Metadata

Created
Wed, Dec 25, 08:35

PhabricatorContentSourceModule.php

<?php
final class PhabricatorContentSourceModule
extends PhabricatorConfigModule {
public function getModuleKey() {
return 'contentsource';
}
public function getModuleName() {
return pht('Content Sources');
}
public function renderModuleStatus(AphrontRequest $request) {
$viewer = $request->getViewer();
$sources = PhabricatorContentSource::getAllContentSources();
ksort($sources);
$rows = array();
foreach ($sources as $source) {
$rows[] = array(
$source->getSourceTypeConstant(),
get_class($source),
$source->getSourceName(),
$source->getSourceDescription(),
);
}
$table = id(new AphrontTableView($rows))
->setHeaders(
array(
pht('Key'),
pht('Class'),
pht('Source'),
pht('Description'),
))
->setColumnClasses(
array(
null,
null,
'pri',
'wide',
));
return id(new PHUIObjectBoxView())
->setHeaderText(pht('Content Sources'))
->setTable($table);
}
}

Event Timeline