2013-01-16 19:52:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorOwnersConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Owners');
|
2013-01-16 19:52:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Configure Owners.');
|
2013-01-16 19:52:30 +01:00
|
|
|
}
|
|
|
|
|
2016-01-28 17:40:22 +01:00
|
|
|
public function getIcon() {
|
2015-02-02 19:17:25 +01:00
|
|
|
return 'fa-gift';
|
|
|
|
}
|
|
|
|
|
2015-02-09 22:10:56 +01:00
|
|
|
public function getGroup() {
|
|
|
|
return 'apps';
|
|
|
|
}
|
|
|
|
|
2013-01-16 19:52:30 +01:00
|
|
|
public function getOptions() {
|
2015-09-10 22:32:31 +02:00
|
|
|
$custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
|
|
|
|
$default_fields = array();
|
|
|
|
|
|
|
|
$field_base_class = id(new PhabricatorOwnersPackage())
|
|
|
|
->getCustomFieldBaseClass();
|
|
|
|
|
|
|
|
$fields_example = array(
|
|
|
|
'mycompany:lore' => array(
|
|
|
|
'name' => pht('Package Lore'),
|
|
|
|
'type' => 'remarkup',
|
|
|
|
'caption' => pht('Tales of adventure for this package.'),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
$fields_example = id(new PhutilJSON())->encodeFormatted($fields_example);
|
|
|
|
|
2013-01-16 19:52:30 +01:00
|
|
|
return array(
|
|
|
|
$this->newOption('metamta.package.subject-prefix', 'string', '[Package]')
|
2014-10-07 15:01:04 +02:00
|
|
|
->setDescription(pht('Subject prefix for Owners email.')),
|
2015-09-10 22:32:31 +02:00
|
|
|
$this->newOption('owners.fields', $custom_field_type, $default_fields)
|
|
|
|
->setCustomData($field_base_class)
|
|
|
|
->setDescription(pht('Select and reorder package fields.')),
|
|
|
|
$this->newOption('owners.custom-field-definitions', 'wild', array())
|
|
|
|
->setSummary(pht('Custom Owners fields.'))
|
|
|
|
->setDescription(
|
|
|
|
pht(
|
|
|
|
'Map of custom fields for Owners packages. For details on '.
|
|
|
|
'adding custom fields to Owners, see "Configuring Custom '.
|
|
|
|
'Fields" in the documentation.'))
|
|
|
|
->addExample($fields_example, pht('Valid Setting')),
|
2013-01-16 19:52:30 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|