mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-28 07:28:20 +01:00
26 lines
578 B
PHP
26 lines
578 B
PHP
|
<?php
|
||
|
|
||
|
final class DivinerBookSearchIndexer extends PhabricatorSearchDocumentIndexer {
|
||
|
|
||
|
public function getIndexableObject() {
|
||
|
return new DivinerLiveBook();
|
||
|
}
|
||
|
|
||
|
protected function buildAbstractDocumentByPHID($phid) {
|
||
|
$book = $this->loadDocumentByPHID($phid);
|
||
|
|
||
|
$doc = $this->newDocument($phid)
|
||
|
->setDocumentTitle($book->getTitle())
|
||
|
->setDocumentCreated($book->getDateCreated())
|
||
|
->setDocumentModified($book->getDateModified());
|
||
|
|
||
|
$doc->addField(
|
||
|
PhabricatorSearchField::FIELD_BODY,
|
||
|
$book->getPreface());
|
||
|
|
||
|
return $doc;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|