mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-15 00:08:37 +01:00
28 lines
713 B
PHP
28 lines
713 B
PHP
|
<?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());
|
||
|
}
|
||
|
|
||
|
}
|