[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class HarbormasterBuildStepCoreCustomField 4 extends HarbormasterBuildStepCustomField 5 implements PhabricatorStandardCustomFieldInterface { 6 7 public function getStandardCustomFieldNamespace() { 8 return 'harbormaster:core'; 9 } 10 11 public function createFields($object) { 12 $impl = $object->getStepImplementation(); 13 $specs = $impl->getFieldSpecifications(); 14 15 if ($impl->supportsWaitForMessage()) { 16 $specs['builtin.next-steps-header'] = array( 17 'type' => 'header', 18 'name' => pht('Next Steps'), 19 ); 20 21 $specs['builtin.wait-for-message'] = array( 22 'type' => 'select', 23 'name' => pht('When Complete'), 24 'instructions' => pht( 25 'After completing this build step Harbormaster can continue the '. 26 'build normally, or it can pause the build and wait for a message. '. 27 'If you are using this build step to trigger some work in an '. 28 'external system, you may want to have Phabricator wait for that '. 29 'system to perform the work and report results back.'. 30 "\n\n". 31 'If you select **Continue Build Normally**, the build plan will '. 32 'proceed once this step finishes.'. 33 "\n\n". 34 'If you select **Wait For Message**, the build plan will pause '. 35 'indefinitely once this step finishes. To resume the build, an '. 36 'external system must call `harbormaster.sendmessage` with the '. 37 'build target PHID, and either `"pass"` or `"fail"` to indicate '. 38 'the result for this step. After the result is recorded, the build '. 39 'plan will resume.'), 40 'options' => array( 41 '' => pht('Continue Build Normally'), 42 'wait' => pht('Wait For Message'), 43 ), 44 ); 45 } 46 47 return PhabricatorStandardCustomField::buildStandardFields($this, $specs); 48 } 49 50 public function shouldUseStorage() { 51 return false; 52 } 53 54 public function readValueFromObject(PhabricatorCustomFieldInterface $object) { 55 $key = $this->getProxy()->getRawStandardFieldKey(); 56 $this->setValueFromStorage($object->getDetail($key)); 57 } 58 59 public function applyApplicationTransactionInternalEffects( 60 PhabricatorApplicationTransaction $xaction) { 61 $object = $this->getObject(); 62 $key = $this->getProxy()->getRawStandardFieldKey(); 63 64 $this->setValueFromApplicationTransactions($xaction->getNewValue()); 65 $value = $this->getValueForStorage(); 66 67 $object->setDetail($key, $value); 68 } 69 70 public function applyApplicationTransactionExternalEffects( 71 PhabricatorApplicationTransaction $xaction) { 72 return; 73 } 74 75 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |