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

Port Maniphest options.

Test Plan: Viewed the new options.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2255

Differential Revision: https://secure.phabricator.com/D4401
This commit is contained in:
Ricky Elrod 2013-01-11 10:24:35 -08:00 committed by epriestley
parent 63863dadeb
commit 30345cfbdd
2 changed files with 53 additions and 0 deletions

View file

@ -927,6 +927,7 @@ phutil_register_library_map(array(
'PhabricatorMainMenuIconView' => 'view/page/menu/PhabricatorMainMenuIconView.php',
'PhabricatorMainMenuSearchView' => 'view/page/menu/PhabricatorMainMenuSearchView.php',
'PhabricatorMainMenuView' => 'view/page/menu/PhabricatorMainMenuView.php',
'PhabricatorManiphestConfigOptions' => 'applications/maniphest/config/PhabricatorManiphestConfigOptions.php',
'PhabricatorMarkupCache' => 'applications/cache/storage/PhabricatorMarkupCache.php',
'PhabricatorMarkupEngine' => 'infrastructure/markup/PhabricatorMarkupEngine.php',
'PhabricatorMarkupInterface' => 'infrastructure/markup/PhabricatorMarkupInterface.php',
@ -2274,6 +2275,7 @@ phutil_register_library_map(array(
'PhabricatorMainMenuIconView' => 'AphrontView',
'PhabricatorMainMenuSearchView' => 'AphrontView',
'PhabricatorMainMenuView' => 'AphrontView',
'PhabricatorManiphestConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorMarkupCache' => 'PhabricatorCacheDAO',
'PhabricatorMenuItemView' => 'AphrontView',
'PhabricatorMenuView' => 'AphrontView',

View file

@ -0,0 +1,51 @@
<?php
final class PhabricatorManiphestConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht("Maniphest");
}
public function getDescription() {
return pht("Configure Maniphest.");
}
public function getOptions() {
return array(
$this->newOption('maniphest.enabled', 'bool', true)
->setDescription(pht("Enable Maniphest")),
$this->newOption('maniphest.custom-fields', 'wild', array())
->setSummary(pht("Custom Maniphest fields."))
->setDescription(
pht(
"Array of custom fields for Maniphest tasks. For details on ".
"adding custom fields to Maniphest, see 'Maniphest User Guide: ".
"Adding Custom Fields'."))
->addExample(
'{"mycompany:estimated-hours": {"label": "Estimated Hours", '.
'"type": "int", "caption": "Estimated number of hours this will '.
'take.", "required": false}}',
pht('Valid Setting')),
$this->newOption(
'maniphest.custom-task-extensions-class',
'class',
'ManiphestDefaultTaskExtensions')
->setBaseClass('ManiphestTaskExtensions')
->setSummary(pht("Class which drives custom field construction."))
->setDescription(
pht(
"Class which drives custom field construction. See 'Maniphest ".
"User Guide: Adding Custom Fields' in the documentation for more ".
"information.")),
$this->newOption('maniphest.default-priority', 'int', 90)
->setSummary(pht("Default task priority for create flows."))
->setDescription(
pht(
"What should the default task priority be in create flows? See ".
"the constants in @{class:ManiphestTaskPriority} for valid ".
"values. Defaults to 'needs triage'.")),
);
}
}