Differential D25018 Diff 57 src/applications/legalpad/engineextension/PhabricatorLegalpadBodySearchEngineAttachment.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/legalpad/engineextension/PhabricatorLegalpadBodySearchEngineAttachment.php
- This file was added.
<?php | |||||
final class PhabricatorLegalpadBodySearchEngineAttachment | |||||
extends PhabricatorSearchEngineAttachment { | |||||
public function getAttachmentName() { | |||||
return pht('Legalpad Document Body'); | |||||
} | |||||
public function getAttachmentDescription() { | |||||
return pht('Get the full content for each document.'); | |||||
} | |||||
public function willLoadAttachmentData($query, $spec) { | |||||
$query->needDocumentBodies(true); | |||||
} | |||||
public function getAttachmentForObject($object, $data, $spec) { | |||||
return array( | |||||
'body' => $object->getDocumentBody()->getText(), | |||||
'preamble' => $object->getPreamble(), | |||||
); | |||||
} | |||||
} |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0