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