Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/controller/PhabricatorController.php
Show First 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | public function newDialog() { | ||||
return id(new AphrontDialogView()) | return id(new AphrontDialogView()) | ||||
->setUser($this->getRequest()->getUser()) | ->setUser($this->getRequest()->getUser()) | ||||
->setSubmitURI($submit_uri); | ->setSubmitURI($submit_uri); | ||||
} | } | ||||
public function newPage() { | public function newPage() { | ||||
$page = id(new PhabricatorStandardPageView()) | $page = id(new PhabricatorStandardPageView()) | ||||
->setRequest($this->getRequest()) | ->setRequest($this->getRequest()) | ||||
->setController($this); | ->setController($this) | ||||
->setDeviceReady(true); | |||||
$application = $this->getCurrentApplication(); | $application = $this->getCurrentApplication(); | ||||
if ($application) { | if ($application) { | ||||
$page->setApplicationName($application->getName()); | $page->setApplicationName($application->getName()); | ||||
if ($application->getTitleGlyph()) { | if ($application->getTitleGlyph()) { | ||||
$page->setGlyph($application->getTitleGlyph()); | $page->setGlyph($application->getTitleGlyph()); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | public function buildApplicationPage($view, array $options) { | ||||
$page->appendChild($view); | $page->appendChild($view); | ||||
$object_phids = idx($options, 'pageObjects', array()); | $object_phids = idx($options, 'pageObjects', array()); | ||||
if ($object_phids) { | if ($object_phids) { | ||||
$page->setPageObjectPHIDs($object_phids); | $page->setPageObjectPHIDs($object_phids); | ||||
} | } | ||||
if (idx($options, 'device', true)) { | if (!idx($options, 'device', true)) { | ||||
$page->setDeviceReady(true); | $page->setDeviceReady(false); | ||||
} | } | ||||
$page->setShowFooter(idx($options, 'showFooter', true)); | $page->setShowFooter(idx($options, 'showFooter', true)); | ||||
$page->setShowChrome(idx($options, 'chrome', true)); | $page->setShowChrome(idx($options, 'chrome', true)); | ||||
return $page->produceAphrontResponse(); | return $page->produceAphrontResponse(); | ||||
} | } | ||||
} | } |