Differential D14842 Diff 35894 src/applications/passphrase/search/PassphraseCredentialFulltextEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/passphrase/search/PassphraseCredentialFulltextEngine.php
- This file was added.
<?php | |||||
final class PassphraseCredentialFulltextEngine | |||||
extends PhabricatorFulltextEngine { | |||||
protected function buildAbstractDocument( | |||||
PhabricatorSearchAbstractDocument $document, | |||||
$object) { | |||||
$credential = $object; | |||||
$document->setDocumentTitle($credential->getName()); | |||||
$document->addField( | |||||
PhabricatorSearchDocumentFieldType::FIELD_BODY, | |||||
$credential->getDescription()); | |||||
$document->addRelationship( | |||||
$credential->getIsDestroyed() | |||||
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | |||||
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | |||||
$credential->getPHID(), | |||||
PassphraseCredentialPHIDType::TYPECONST, | |||||
PhabricatorTime::getNow()); | |||||
} | |||||
} |