1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Add the "Extending Phabricator" config group.

Summary: Refs T2255 and takes care of the "EXTENDING PHABRICATOR" group thereof.

Test Plan: Looked at each of the new options.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4325
This commit is contained in:
Ricky Elrod 2013-01-02 15:52:30 -08:00 committed by epriestley
parent cad546301d
commit 7b2ab1a4bc
2 changed files with 45 additions and 0 deletions

View file

@ -763,6 +763,7 @@ phutil_register_library_map(array(
'PhabricatorEventEngine' => 'infrastructure/events/PhabricatorEventEngine.php',
'PhabricatorEventType' => 'infrastructure/events/constant/PhabricatorEventType.php',
'PhabricatorExampleEventListener' => 'infrastructure/events/PhabricatorExampleEventListener.php',
'PhabricatorExtendingPhabricatorConfigOptions' => 'applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php',
'PhabricatorFacebookConfigOptions' => 'applications/config/option/PhabricatorFacebookConfigOptions.php',
'PhabricatorFactAggregate' => 'applications/fact/storage/PhabricatorFactAggregate.php',
'PhabricatorFactChartController' => 'applications/fact/controller/PhabricatorFactChartController.php',
@ -2103,6 +2104,7 @@ phutil_register_library_map(array(
'PhabricatorEvent' => 'PhutilEvent',
'PhabricatorEventType' => 'PhutilEventType',
'PhabricatorExampleEventListener' => 'PhutilEventListener',
'PhabricatorExtendingPhabricatorConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorFacebookConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorFactAggregate' => 'PhabricatorFactDAO',
'PhabricatorFactChartController' => 'PhabricatorFactController',

View file

@ -0,0 +1,43 @@
<?php
final class PhabricatorExtendingPhabricatorConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht("Extending Phabricator");
}
public function getDescription() {
return pht("Make Phabricator even cooler!");
}
public function getOptions() {
return array(
$this->newOption('load-libraries', 'list<string>', null)
->setSummary(pht("Paths to additional phutil libraries to load."))
->addExample('/srv/our-sekrit-libs/sekrit-phutil', 'Valid Setting'),
$this->newOption('events.listeners', 'list<string>', null)
->setSummary(
pht("Listeners receive callbacks when interesting things occur."))
->setDescription(
pht(
"You can respond to various application events by installing ".
"listeners, which will receive callbacks when interesting things ".
"occur. Specify a list of classes which extend ".
"PhabricatorEventListener here."))
->addExample('MyEventListener', 'Valid Setting'),
$this->newOption(
'celerity.resource-path',
'string',
'__celerity_resource_map__.php')
->setSummary(
pht("Custom celerity resource map."))
->setDescription(
pht(
"Path to custom celerity resource map relative to ".
"'phabricator/src'. See also `scripts/celerity_mapper.php`."))
->addExample('local/my_celerity_map.php', 'Valid Setting'),
);
}
}