[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorReleephApplicationConfigOptions 4 extends PhabricatorApplicationConfigOptions { 5 6 public function getName() { 7 return pht('Releeph'); 8 } 9 10 public function getDescription() { 11 return pht('Options for configuring Releeph, the release branch tool.'); 12 } 13 14 public function getOptions() { 15 $default_fields = array( 16 new ReleephSummaryFieldSpecification(), 17 new ReleephRequestorFieldSpecification(), 18 new ReleephSeverityFieldSpecification(), 19 new ReleephIntentFieldSpecification(), 20 new ReleephReasonFieldSpecification(), 21 new ReleephAuthorFieldSpecification(), 22 new ReleephRevisionFieldSpecification(), 23 new ReleephOriginalCommitFieldSpecification(), 24 new ReleephBranchCommitFieldSpecification(), 25 new ReleephDiffSizeFieldSpecification(), 26 new ReleephDiffChurnFieldSpecification(), 27 new ReleephDiffMessageFieldSpecification(), 28 new ReleephCommitMessageFieldSpecification(), 29 ); 30 31 $default = array(); 32 foreach ($default_fields as $default_field) { 33 $default[$default_field->getFieldKey()] = true; 34 } 35 36 foreach ($default as $key => $enabled) { 37 $default[$key] = array( 38 'disabled' => !$enabled, 39 ); 40 } 41 42 $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; 43 44 return array( 45 $this->newOption('releeph.fields', $custom_field_type, $default) 46 ->setCustomData('ReleephFieldSpecification'), 47 $this->newOption( 48 'releeph.default-branch-template', 49 'string', 50 'releases/%P/%p-%Y%m%d-%v') 51 ->setDescription( 52 pht( 53 'The default branch template for new branches in unconfigured '. 54 'Releeph projects. This is also configurable on a per-project '. 55 'basis.')), 56 ); 57 } 58 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |