1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-28 15:38:19 +01:00
phorge-phorge/src/applications/project/search/PhabricatorProjectFulltextEngine.php

25 lines
622 B
PHP
Raw Normal View History

<?php
final class PhabricatorProjectFulltextEngine
extends PhabricatorFulltextEngine {
protected function buildAbstractDocument(
PhabricatorSearchAbstractDocument $document,
$object) {
$project = $object;
$project->updateDatasourceTokens();
$document->setDocumentTitle($project->getName());
$document->addRelationship(
$project->isArchived()
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
$project->getPHID(),
PhabricatorProjectProjectPHIDType::TYPECONST,
PhabricatorTime::getNow());
}
}