Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/method/ConduitAPIMethod.php
Show All 34 Lines | abstract class ConduitAPIMethod | ||||
* | * | ||||
* This method should return remarkup. | * This method should return remarkup. | ||||
* | * | ||||
* @return string Detailed description of the method. | * @return string Detailed description of the method. | ||||
* @task info | * @task info | ||||
*/ | */ | ||||
abstract public function getMethodDescription(); | abstract public function getMethodDescription(); | ||||
public function getMethodDocumentation() { | final public function getDocumentationPages(PhabricatorUser $viewer) { | ||||
return null; | $pages = $this->newDocumentationPages($viewer); | ||||
return $pages; | |||||
} | |||||
protected function newDocumentationPages(PhabricatorUser $viewer) { | |||||
return array(); | |||||
} | |||||
final protected function newDocumentationPage(PhabricatorUser $viewer) { | |||||
return id(new ConduitAPIDocumentationPage()) | |||||
->setIconIcon('fa-chevron-right'); | |||||
} | |||||
final protected function newDocumentationBoxPage( | |||||
PhabricatorUser $viewer, | |||||
$title, | |||||
$content) { | |||||
$box_view = id(new PHUIObjectBoxView()) | |||||
->setHeaderText($title) | |||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | |||||
->setTable($content); | |||||
return $this->newDocumentationPage($viewer) | |||||
->setName($title) | |||||
->setContent($box_view); | |||||
} | } | ||||
abstract protected function defineParamTypes(); | abstract protected function defineParamTypes(); | ||||
abstract protected function defineReturnType(); | abstract protected function defineReturnType(); | ||||
protected function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array(); | return array(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |