pht('Phame User Guide'), 'href' => PhabricatorEnv::getDoclink('Phame User Guide'), ), ); } public function isPrototype() { return true; } public function getRoutes() { return array( '/phame/' => array( '' => 'PhameHomeController', // NOTE: The live routes include an initial "/", so leave it off // this route. '(?Plive)/(?P\d+)' => $this->getLiveRoutes(), 'post/' => array( '(?:query/(?P[^/]+)/)?' => 'PhamePostListController', 'blogger/(?P[\w\.-_]+)/' => 'PhamePostListController', 'edit/(?:(?P[^/]+)/)?' => 'PhamePostEditController', 'history/(?P\d+)/' => 'PhamePostHistoryController', 'view/(?P\d+)/(?:(?P[^/]+)/)?' => 'PhamePostViewController', '(?Ppublish|unpublish)/(?P\d+)/' => 'PhamePostPublishController', 'preview/(?P\d+)/' => 'PhamePostPreviewController', 'preview/' => 'PhabricatorMarkupPreviewController', 'framed/(?P\d+)/' => 'PhamePostFramedController', 'move/(?P\d+)/' => 'PhamePostMoveController', 'comment/(?P[1-9]\d*)/' => 'PhamePostCommentController', ), 'blog/' => array( '(?:query/(?P[^/]+)/)?' => 'PhameBlogListController', 'archive/(?P[^/]+)/' => 'PhameBlogArchiveController', $this->getEditRoutePattern('edit/') => 'PhameBlogEditController', 'view/(?P\d+)/' => 'PhameBlogViewController', 'manage/(?P[^/]+)/' => 'PhameBlogManageController', 'feed/(?P[^/]+)/' => 'PhameBlogFeedController', 'picture/(?P[1-9]\d*)/' => 'PhameBlogProfilePictureController', ), ) + $this->getResourceSubroutes(), ); } public function getResourceRoutes() { return array( '/phame/' => $this->getResourceSubroutes(), ); } private function getResourceSubroutes() { return array( 'r/(?P\d+)/(?P[^/]+)/(?P.*)' => 'PhameResourceController', ); } public function getBlogRoutes() { return $this->getLiveRoutes(); } private function getLiveRoutes() { return array( '/' => array( '' => 'PhameBlogViewController', 'post/(?P\d+)/(?:(?P[^/]+)/)?' => 'PhamePostViewController', ), ); } public function getQuicksandURIPatternBlacklist() { return array( '/phame/live/.*', ); } protected function getCustomCapabilities() { return array( PhameBlogCreateCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_USER, 'caption' => pht('Default create policy for blogs.'), ), ); } }