Differential D15352 Diff 37023 src/applications/harbormaster/controller/HarbormasterStepViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterStepViewController.php
Show All 12 Lines | public function handleRequest(AphrontRequest $request) { | ||||
if (!$step) { | if (!$step) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$plan = $step->getBuildPlan(); | $plan = $step->getBuildPlan(); | ||||
$plan_id = $plan->getID(); | $plan_id = $plan->getID(); | ||||
$plan_uri = $this->getApplicationURI("plan/{$plan_id}/"); | $plan_uri = $this->getApplicationURI("plan/{$plan_id}/"); | ||||
$implementation = $step->getStepImplementation(); | |||||
$field_list = PhabricatorCustomField::getObjectFields( | $field_list = PhabricatorCustomField::getObjectFields( | ||||
$step, | $step, | ||||
PhabricatorCustomField::ROLE_VIEW); | PhabricatorCustomField::ROLE_VIEW); | ||||
$field_list | $field_list | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->readFieldsFromStorage($step); | ->readFieldsFromStorage($step); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
Show All 29 Lines | private function buildPropertyList( | ||||
HarbormasterBuildStep $step, | HarbormasterBuildStep $step, | ||||
PhabricatorCustomFieldList $field_list) { | PhabricatorCustomFieldList $field_list) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$view = id(new PHUIPropertyListView()) | $view = id(new PHUIPropertyListView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setObject($step); | ->setObject($step); | ||||
try { | |||||
$implementation = $step->getStepImplementation(); | |||||
} catch (Exception $ex) { | |||||
$implementation = null; | |||||
} | |||||
if ($implementation) { | |||||
$type = $implementation->getName(); | |||||
} else { | |||||
$type = phutil_tag( | |||||
'em', | |||||
array(), | |||||
pht( | |||||
'Invalid Implementation ("%s")!', | |||||
$step->getClassName())); | |||||
} | |||||
$view->addProperty(pht('Step Type'), $type); | |||||
$view->addProperty( | $view->addProperty( | ||||
pht('Created'), | pht('Created'), | ||||
phabricator_datetime($step->getDateCreated(), $viewer)); | phabricator_datetime($step->getDateCreated(), $viewer)); | ||||
$field_list->appendFieldsToPropertyList( | $field_list->appendFieldsToPropertyList( | ||||
$step, | $step, | ||||
$viewer, | $viewer, | ||||
$view); | $view); | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |