Page MenuHomePhorge

PholioSearchIndexer.php
No OneTemporary

Size
890 B
Referenced Files
None
Subscribers
None

PholioSearchIndexer.php

<?php
/**
* @group pholio
*/
final class PholioSearchIndexer extends PhabricatorSearchDocumentIndexer {
public function getIndexableObject() {
return new PholioMock();
}
protected function buildAbstractDocumentByPHID($phid) {
$mock = $this->loadDocumentByPHID($phid);
$doc = $this->newDocument($phid)
->setDocumentTitle($mock->getName())
->setDocumentCreated($mock->getDateCreated())
->setDocumentModified($mock->getDateModified());
$doc->addField(
PhabricatorSearchField::FIELD_BODY,
$mock->getDescription());
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR,
$mock->getAuthorPHID(),
PhabricatorPeoplePHIDTypeUser::TYPECONST,
$mock->getDateCreated());
$this->indexTransactions(
$doc,
new PholioTransactionQuery(),
array($phid));
return $doc;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 5, 7:14 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70022
Default Alt Text
PholioSearchIndexer.php (890 B)

Event Timeline