Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/guides/module/PhabricatorGuideModule.php
12242 views
1
<?php
2
3
abstract class PhabricatorGuideModule extends Phobject {
4
5
abstract public function getModuleKey();
6
abstract public function getModuleName();
7
abstract public function getModulePosition();
8
abstract public function getIsModuleEnabled();
9
abstract public function renderModuleStatus(AphrontRequest $request);
10
11
final public static function getAllModules() {
12
return id(new PhutilClassMapQuery())
13
->setAncestorClass(__CLASS__)
14
->setUniqueMethod('getModuleKey')
15
->setSortMethod('getModulePosition')
16
->execute();
17
}
18
19
final public static function getEnabledModules() {
20
return id(new PhutilClassMapQuery())
21
->setAncestorClass(__CLASS__)
22
->setUniqueMethod('getModuleKey')
23
->setSortMethod('getModulePosition')
24
->setFilterMethod('getIsModuleEnabled')
25
->execute();
26
}
27
28
}
29
30