Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/passphrase/search/PassphraseCredentialFulltextEngine.php
12256 views
1
<?php
2
3
final class PassphraseCredentialFulltextEngine
4
extends PhabricatorFulltextEngine {
5
6
protected function buildAbstractDocument(
7
PhabricatorSearchAbstractDocument $document,
8
$object) {
9
10
$credential = $object;
11
12
$document->setDocumentTitle($credential->getName());
13
14
$document->addField(
15
PhabricatorSearchDocumentFieldType::FIELD_BODY,
16
$credential->getDescription());
17
18
$document->addRelationship(
19
$credential->getIsDestroyed()
20
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
21
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
22
$credential->getPHID(),
23
PassphraseCredentialPHIDType::TYPECONST,
24
PhabricatorTime::getNow());
25
}
26
27
}
28
29