Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/owners/config/PhabricatorOwnersConfigOptions.php
12256 views
1
<?php
2
3
final class PhabricatorOwnersConfigOptions
4
extends PhabricatorApplicationConfigOptions {
5
6
public function getName() {
7
return pht('Owners');
8
}
9
10
public function getDescription() {
11
return pht('Configure Owners.');
12
}
13
14
public function getIcon() {
15
return 'fa-gift';
16
}
17
18
public function getGroup() {
19
return 'apps';
20
}
21
22
public function getOptions() {
23
$custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
24
$default_fields = array();
25
26
$field_base_class = id(new PhabricatorOwnersPackage())
27
->getCustomFieldBaseClass();
28
29
$fields_example = array(
30
'mycompany:lore' => array(
31
'name' => pht('Package Lore'),
32
'type' => 'remarkup',
33
'caption' => pht('Tales of adventure for this package.'),
34
),
35
);
36
$fields_example = id(new PhutilJSON())->encodeFormatted($fields_example);
37
38
return array(
39
$this->newOption('owners.fields', $custom_field_type, $default_fields)
40
->setCustomData($field_base_class)
41
->setDescription(pht('Select and reorder package fields.')),
42
$this->newOption('owners.custom-field-definitions', 'wild', array())
43
->setSummary(pht('Custom Owners fields.'))
44
->setDescription(
45
pht(
46
'Map of custom fields for Owners packages. For details on '.
47
'adding custom fields to Owners, see "Configuring Custom '.
48
'Fields" in the documentation.'))
49
->addExample($fields_example, pht('Valid Setting')),
50
);
51
}
52
53
}
54
55