Page MenuHomePhorge

PhabricatorProjectSearchIndexer.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorProjectSearchIndexer.php

<?php
final class PhabricatorProjectSearchIndexer
extends PhabricatorSearchDocumentIndexer {
public function getIndexableObject() {
return new PhabricatorProject();
}
protected function buildAbstractDocumentByPHID($phid) {
$project = $this->loadDocumentByPHID($phid);
$doc = new PhabricatorSearchAbstractDocument();
$doc->setPHID($project->getPHID());
$doc->setDocumentType(PhabricatorProjectPHIDTypeProject::TYPECONST);
$doc->setDocumentTitle($project->getName());
$doc->setDocumentCreated($project->getDateCreated());
$doc->setDocumentModified($project->getDateModified());
$this->indexSubscribers($doc);
$this->indexCustomFields($doc, $project);
$doc->addRelationship(
$project->isArchived()
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
$project->getPHID(),
PhabricatorProjectPHIDTypeProject::TYPECONST,
time());
// NOTE: This could be more full-featured, but for now we're mostly
// interested in the side effects of indexing.
return $doc;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, May 4, 7:45 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64082
Default Alt Text
PhabricatorProjectSearchIndexer.php (1 KB)

Event Timeline