1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 19:02:41 +01:00
phorge-phorge/src/applications/settings/setting/PhabricatorOlderInlinesSetting.php
epriestley 5e6716399c Make Settings modular and allow them to be EditEngine'd
Summary: Ref T4103. This starts breaking out settings in a modern way to prepare for global defaults.

Test Plan:
  - Edited diff settings.
  - Saw them take effect in primary settings pane.
  - Set stuff to new automatic defaults.
  - Tried to edit another user's settings.
  - Edited a bot's settings as an administrator.

{F1669077}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4103

Differential Revision: https://secure.phabricator.com/D15995
2016-05-31 15:32:02 -07:00

35 lines
910 B
PHP

<?php
final class PhabricatorOlderInlinesSetting
extends PhabricatorSelectSetting {
const SETTINGKEY = 'diff-ghosts';
const VALUE_GHOST_INLINES_ENABLED = 'default';
const VALUE_GHOST_INLINES_DISABLED = 'disabled';
public function getSettingName() {
return pht('Show Older Inlines');
}
protected function getControlInstructions() {
return pht(
'When a revision is updated, Phabricator attempts to bring inline '.
'comments on the older version forward to the new changes. You can '.
'disable this behavior if you prefer comments stay anchored in one '.
'place.');
}
public function getSettingDefaultValue() {
return self::VALUE_GHOST_INLINES_ENABLED;
}
protected function getSelectOptions() {
return array(
self::VALUE_GHOST_INLINES_ENABLED => pht('Enabled'),
self::VALUE_GHOST_INLINES_DISABLED => pht('Disabled'),
);
}
}