Differential D21488 Diff 51146 src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
| <?php | <?php | ||||
| final class HarbormasterBuildStep extends HarbormasterDAO | final class HarbormasterBuildStep extends HarbormasterDAO | ||||
| implements | implements | ||||
| PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
| PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
| PhabricatorCustomFieldInterface { | PhabricatorCustomFieldInterface, | ||||
| PhabricatorConduitResultInterface { | |||||
| protected $name; | protected $name; | ||||
| protected $description; | protected $description; | ||||
| protected $buildPlanPHID; | protected $buildPlanPHID; | ||||
| protected $className; | protected $className; | ||||
| protected $details = array(); | protected $details = array(); | ||||
| protected $sequence = 0; | protected $sequence = 0; | ||||
| protected $stepAutoKey; | protected $stepAutoKey; | ||||
| ▲ Show 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | public function getCustomFields() { | ||||
| return $this->assertAttached($this->customFields); | return $this->assertAttached($this->customFields); | ||||
| } | } | ||||
| public function attachCustomFields(PhabricatorCustomFieldAttachment $fields) { | public function attachCustomFields(PhabricatorCustomFieldAttachment $fields) { | ||||
| $this->customFields = $fields; | $this->customFields = $fields; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| /* -( PhabricatorConduitResultInterface )---------------------------------- */ | |||||
| public function getFieldSpecificationsForConduit() { | |||||
| return array( | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('name') | |||||
| ->setType('string') | |||||
| ->setDescription(pht('The name of the build step.')), | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('description') | |||||
| ->setType('remarkup') | |||||
| ->setDescription(pht('The build step description.')), | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('buildPlanPHID') | |||||
| ->setType('phid') | |||||
| ->setDescription( | |||||
| pht( | |||||
| 'The PHID of the build plan this build step belongs to.')), | |||||
| ); | |||||
| } | |||||
| public function getFieldValuesForConduit() { | |||||
| // T6203: This can be removed once the field becomes non-nullable. | |||||
| $name = $this->getName(); | |||||
| $name = phutil_string_cast($name); | |||||
| return array( | |||||
| 'name' => $name, | |||||
| 'description' => array( | |||||
| 'raw' => $this->getDescription(), | |||||
| ), | |||||
| 'buildPlanPHID' => $this->getBuildPlanPHID(), | |||||
| ); | |||||
| } | |||||
| public function getConduitSearchAttachments() { | |||||
| return array(); | |||||
| } | |||||
| } | } | ||||