Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorSettingsPanel.php
| Show First 20 Lines • Show All 229 Lines • ▼ Show 20 Lines | protected function loadTargetPreferences() { | ||||
| return $preferences; | return $preferences; | ||||
| } | } | ||||
| protected function newDialog() { | protected function newDialog() { | ||||
| return $this->getController()->newDialog(); | return $this->getController()->newDialog(); | ||||
| } | } | ||||
| protected function writeSetting( | |||||
| PhabricatorUserPreferences $preferences, | |||||
| $key, | |||||
| $value) { | |||||
| $viewer = $this->getViewer(); | |||||
| $request = $this->getController()->getRequest(); | |||||
| $editor = id(new PhabricatorUserPreferencesEditor()) | |||||
| ->setActor($viewer) | |||||
| ->setContentSourceFromRequest($request) | |||||
| ->setContinueOnNoEffect(true) | |||||
| ->setContinueOnMissingFields(true); | |||||
| $xactions = array(); | |||||
| $xactions[] = $preferences->newTransaction($key, $value); | |||||
| $editor->applyTransactions($preferences, $xactions); | |||||
| } | |||||
| } | } | ||||