1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-15 00:08:37 +01:00
phorge-phorge/src/applications/passphrase/search/PassphraseCredentialFulltextEngine.php

28 lines
713 B
PHP
Raw Normal View History

<?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());
}
}