protected function handleAction(NuanceItem $item, $action) { $viewer = $this->getViewer(); $controller = $this->getController(); switch ($action) { case 'raw': $raw = array('api.type' => $item->getItemProperty('api.type'), 'api.raw' => $item->getItemProperty('api.raw')); $raw_output = id(new PhutilJSON())->encodeFormatted($raw); $raw_box = id(new AphrontFormTextAreaControl())->setCustomClass('PhabricatorMonospaced')->setLabel(pht('Raw Event'))->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)->setValue($raw_output); $form = id(new AphrontFormView())->appendChild($raw_box); return $controller->newDialog()->setWidth(AphrontDialogView::WIDTH_FULL)->setTitle(pht('GitHub Raw Event'))->appendForm($form)->addCancelButton($item->getURI(), pht('Done')); case 'sync': case 'reload': $item->issueCommand($viewer->getPHID(), $action); return id(new AphrontRedirectResponse())->setURI($item->getURI()); } return null; }