Page MenuHomePhorge

Aphront404Response.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

Aphront404Response.php

<?php
final class Aphront404Response extends AphrontHTMLResponse {
public function getHTTPResponseCode() {
return 404;
}
public function buildResponseString() {
$request = $this->getRequest();
$viewer = $request->getViewer();
// See T13636. Note that this response may be served from a Site other than
// the primary PlatformSite. For now, always link to the PlatformSite.
// (This may not be the best possible place to send users who are currently
// on "real" sites, like the BlogSite.)
$return_uri = PhabricatorEnv::getURI('/');
$dialog = id(new AphrontDialogView())
->setViewer($viewer)
->setTitle(pht('404 Not Found'))
->addCancelButton($return_uri, pht('Return to Charted Waters'))
->appendParagraph(
pht(
'You arrive at your destination, but there is nothing here.'))
->appendParagraph(
pht(
'Perhaps the real treasure was the friends you made '.
'along the way.'));
$view = id(new PhabricatorStandardPageView())
->setTitle(pht('404 Not Found'))
->setRequest($request)
->setDeviceReady(true)
->appendChild($dialog);
return $view->render();
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, May 14, 11:35 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
145883
Default Alt Text
Aphront404Response.php (1 KB)

Event Timeline