Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorSettingsPanel.php
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | $editor = id(new PhabricatorUserPreferencesEditor()) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setContinueOnMissingFields(true); | ->setContinueOnMissingFields(true); | ||||
$xactions = array(); | $xactions = array(); | ||||
$xactions[] = $preferences->newTransaction($key, $value); | $xactions[] = $preferences->newTransaction($key, $value); | ||||
$editor->applyTransactions($preferences, $xactions); | $editor->applyTransactions($preferences, $xactions); | ||||
} | } | ||||
public function newBox($title, $content, $actions = array()) { | |||||
$header = id(new PHUIHeaderView()) | |||||
->setHeader($title); | |||||
foreach ($actions as $action) { | |||||
$header->addActionLink($action); | |||||
} | |||||
$view = id(new PHUIObjectBoxView()) | |||||
->setHeader($header) | |||||
->appendChild($content) | |||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG); | |||||
return $view; | |||||
} | |||||
} | } |