1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 02:02:41 +01:00
phorge-phorge/src/applications/releeph/config/PhabricatorReleephApplicationConfigOptions.php
Chad Little fe5cd4ca2c Move FontIcon calls to Icon
Summary: Normalizes all `setFontIcon` calls to `setIcon`.

Test Plan: UIExamples, Almanac, Apps list, etc.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, hach-que, yelirekim

Differential Revision: https://secure.phabricator.com/D15129
2016-01-28 08:48:45 -08:00

67 lines
1.9 KiB
PHP

<?php
final class PhabricatorReleephApplicationConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht('Releeph');
}
public function getDescription() {
return pht('Options for configuring Releeph, the release branch tool.');
}
public function getIcon() {
return 'fa-flag-checkered';
}
public function getGroup() {
return 'apps';
}
public function getOptions() {
$default_fields = array(
new ReleephSummaryFieldSpecification(),
new ReleephRequestorFieldSpecification(),
new ReleephSeverityFieldSpecification(),
new ReleephIntentFieldSpecification(),
new ReleephReasonFieldSpecification(),
new ReleephAuthorFieldSpecification(),
new ReleephRevisionFieldSpecification(),
new ReleephOriginalCommitFieldSpecification(),
new ReleephBranchCommitFieldSpecification(),
new ReleephDiffSizeFieldSpecification(),
new ReleephDiffChurnFieldSpecification(),
new ReleephDiffMessageFieldSpecification(),
new ReleephCommitMessageFieldSpecification(),
);
$default = array();
foreach ($default_fields as $default_field) {
$default[$default_field->getFieldKey()] = true;
}
foreach ($default as $key => $enabled) {
$default[$key] = array(
'disabled' => !$enabled,
);
}
$custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
return array(
$this->newOption('releeph.fields', $custom_field_type, $default)
->setCustomData('ReleephFieldSpecification'),
$this->newOption(
'releeph.default-branch-template',
'string',
'releases/%P/%p-%Y%m%d-%v')
->setDescription(
pht(
'The default branch template for new branches in unconfigured '.
'Releeph projects. This is also configurable on a per-project '.
'basis.')),
);
}
}