Differential D9431 Diff 22523 src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php
| <?php | <?php | ||||
| final class PhabricatorExtendingPhabricatorConfigOptions | final class PhabricatorExtendingPhabricatorConfigOptions | ||||
| extends PhabricatorApplicationConfigOptions { | extends PhabricatorApplicationConfigOptions { | ||||
| public function getName() { | public function getName() { | ||||
| return pht("Extending Phabricator"); | return pht('Extending Phabricator'); | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return pht("Make Phabricator even cooler!"); | return pht('Make Phabricator even cooler!'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| return array( | return array( | ||||
| $this->newOption('load-libraries', 'list<string>', array()) | $this->newOption('load-libraries', 'list<string>', array()) | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setSummary(pht("Paths to additional phutil libraries to load.")) | ->setSummary(pht('Paths to additional phutil libraries to load.')) | ||||
| ->addExample('/srv/our-libs/sekrit-phutil', pht('Valid Setting')), | ->addExample('/srv/our-libs/sekrit-phutil', pht('Valid Setting')), | ||||
| $this->newOption('events.listeners', 'list<string>', array()) | $this->newOption('events.listeners', 'list<string>', array()) | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht("Listeners receive callbacks when interesting things occur.")) | pht('Listeners receive callbacks when interesting things occur.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| "You can respond to various application events by installing ". | 'You can respond to various application events by installing '. | ||||
| "listeners, which will receive callbacks when interesting things ". | 'listeners, which will receive callbacks when interesting things '. | ||||
| "occur. Specify a list of classes which extend ". | 'occur. Specify a list of classes which extend '. | ||||
| "PhabricatorEventListener here.")) | 'PhabricatorEventListener here.')) | ||||
| ->addExample('MyEventListener', pht('Valid Setting')), | ->addExample('MyEventListener', pht('Valid Setting')), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'aphront.default-application-configuration-class', | 'aphront.default-application-configuration-class', | ||||
| 'class', | 'class', | ||||
| 'AphrontDefaultApplicationConfiguration') | 'AphrontDefaultApplicationConfiguration') | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setBaseClass('AphrontApplicationConfiguration') | ->setBaseClass('AphrontApplicationConfiguration') | ||||
| // TODO: This could probably use some better documentation. | // TODO: This could probably use some better documentation. | ||||
| ->setDescription(pht("Application configuration class.")), | ->setDescription(pht('Application configuration class.')), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||