Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/editor/PhrictionDocumentEditor.php
Show All 17 Lines | final class PhrictionDocumentEditor extends PhabricatorEditor { | ||||
private $fromDocumentPHID; | private $fromDocumentPHID; | ||||
private function __construct() { | private function __construct() { | ||||
// <restricted> | // <restricted> | ||||
} | } | ||||
public static function newForSlug($slug) { | public static function newForSlug($slug) { | ||||
$slug = PhabricatorSlug::normalize($slug); | $slug = PhabricatorSlug::normalize($slug); | ||||
// TODO: Get rid of this. | |||||
$document = id(new PhrictionDocument())->loadOneWhere( | $document = id(new PhrictionDocument())->loadOneWhere( | ||||
'slug = %s', | 'slug = %s', | ||||
$slug); | $slug); | ||||
$content = null; | $content = null; | ||||
if ($document) { | if ($document) { | ||||
$content = id(new PhrictionContent())->load($document->getContentID()); | $content = id(new PhrictionContent())->load($document->getContentID()); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines |