Differential D16356 Diff 39338 src/applications/harbormaster/engineextension/HarbormasterQueryBuildsSearchEngineAttachment.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/engineextension/HarbormasterQueryBuildsSearchEngineAttachment.php
- This file was added.
| <?php | |||||
| final class HarbormasterQueryBuildsSearchEngineAttachment | |||||
| extends PhabricatorSearchEngineAttachment { | |||||
| public function getAttachmentName() { | |||||
| return pht('Harbormaster Query Builds'); | |||||
| } | |||||
| public function getAttachmentDescription() { | |||||
| return pht( | |||||
| 'This attachment exists solely to provide compatibility with the '. | |||||
| 'message format returned by an outdated API method. It will be '. | |||||
| 'taken away at some point and you should not rely on these fields '. | |||||
| 'being available.'); | |||||
| } | |||||
| public function getAttachmentForObject($object, $data, $spec) { | |||||
| $status_name = HarbormasterBuildStatus::getBuildStatusName( | |||||
| $object->getBuildStatus()); | |||||
| return array( | |||||
| 'uri' => PhabricatorEnv::getProductionURI($object->getURI()), | |||||
| 'name' => $object->getName(), | |||||
| 'buildStatusName' => $status_name, | |||||
| ); | |||||
| } | |||||
| } | |||||