getName().' Application'; } public function isEnabled() { return true; } public function getPHID() { return 'PHID-APPS-'.get_class($this); } public function getTypeaheadURI() { return $this->getBaseURI(); } public function getBaseURI() { return null; } public function getIconURI() { return null; } public function getAutospriteName() { return 'default'; } public function shouldAppearInLaunchView() { return true; } public function getCoreApplicationOrder() { return null; } public function getTitleGlyph() { return null; } public function getHelpURI() { // TODO: When these applications get created, link to their docs: // // - Drydock // - OAuth Server return null; } public function getEventListeners() { return array(); } /* -( URI Routing )-------------------------------------------------------- */ public function getRoutes() { return array(); } /* -( Fact Integration )--------------------------------------------------- */ public function getFactObjectsForAnalysis() { return array(); } /* -( UI Integration )----------------------------------------------------- */ public function loadStatus(PhabricatorUser $user) { return array(); } /** * Build items for the main menu. * * @param PhabricatorUser The viewing user. * @param AphrontController The current controller. May be null for special * pages like 404, exception handlers, etc. * @return list List of menu items. * @task UI */ public function buildMainMenuItems( PhabricatorUser $user, PhabricatorController $controller = null) { return array(); } /* -( Application Management )--------------------------------------------- */ public static function getAllInstalledApplications() { static $applications; if (empty($applications)) { $classes = id(new PhutilSymbolLoader()) ->setAncestorClass(__CLASS__) ->setConcreteOnly(true) ->selectAndLoadSymbols(); $apps = array(); foreach ($classes as $class) { $app = newv($class['name'], array()); if (!$app->isEnabled()) { continue; } $apps[] = $app; } $applications = $apps; } return $applications; } }