mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-08 02:18:33 +02:00
Summary: Adds core and apps grouping to configuration options, makes it somewhat easier to browse config options. Test Plan: Set each option, review list. Breakdown is nearly 50/50 apps/core. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11722
51 lines
1.3 KiB
PHP
51 lines
1.3 KiB
PHP
<?php
|
|
|
|
final class PhabricatorProjectConfigOptions
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
public function getName() {
|
|
return pht('Projects');
|
|
}
|
|
|
|
public function getDescription() {
|
|
return pht('Configure Projects.');
|
|
}
|
|
|
|
public function getFontIcon() {
|
|
return 'fa-briefcase';
|
|
}
|
|
|
|
public function getGroup() {
|
|
return 'apps';
|
|
}
|
|
|
|
public function getOptions() {
|
|
$default_fields = array(
|
|
'std:project:internal:description' => true,
|
|
);
|
|
|
|
foreach ($default_fields as $key => $enabled) {
|
|
$default_fields[$key] = array(
|
|
'disabled' => !$enabled,
|
|
);
|
|
}
|
|
|
|
$custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
|
|
|
|
return array(
|
|
$this->newOption('projects.custom-field-definitions', 'wild', array())
|
|
->setSummary(pht('Custom Projects fields.'))
|
|
->setDescription(
|
|
pht(
|
|
'Array of custom fields for Projects.'))
|
|
->addExample(
|
|
'{"mycompany:motto": {"name": "Project Motto", '.
|
|
'"type": "text"}}',
|
|
pht('Valid Setting')),
|
|
$this->newOption('projects.fields', $custom_field_type, $default_fields)
|
|
->setCustomData(id(new PhabricatorProject())->getCustomFieldBaseClass())
|
|
->setDescription(pht('Select and reorder project fields.')),
|
|
);
|
|
}
|
|
|
|
}
|