Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/controller/PhabricatorConduitController.php
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | protected function renderExampleBox(ConduitAPIMethod $method, $params) { | ||||
$panel_link = phutil_tag('strong', array(), $panel_link); | $panel_link = phutil_tag('strong', array(), $panel_link); | ||||
$messages = array( | $messages = array( | ||||
pht( | pht( | ||||
'Use the %s panel in Settings to generate or manage API tokens.', | 'Use the %s panel in Settings to generate or manage API tokens.', | ||||
$panel_link), | $panel_link), | ||||
); | ); | ||||
if ($params === null) { | |||||
$messages[] = pht( | |||||
'If you submit parameters, these examples will update to show '. | |||||
'exactly how to encode the parameters you submit.'); | |||||
} | |||||
$info_view = id(new PHUIInfoView()) | $info_view = id(new PHUIInfoView()) | ||||
->setErrors($messages) | ->setErrors($messages) | ||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE); | ->setSeverity(PHUIInfoView::SEVERITY_NOTICE); | ||||
$tab_group = id(new PHUITabGroupView()) | $tab_group = id(new PHUITabGroupView()) | ||||
->addTab( | ->addTab( | ||||
id(new PHUITabView()) | id(new PHUITabView()) | ||||
->setName(pht('arc call-conduit')) | ->setName(pht('arc call-conduit')) | ||||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |