mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-27 05:59:08 +01:00
29 lines
669 B
PHP
29 lines
669 B
PHP
|
<?php
|
||
|
|
||
|
final class PhameBlogFulltextEngine
|
||
|
extends PhabricatorFulltextEngine {
|
||
|
|
||
|
protected function buildAbstractDocument(
|
||
|
PhabricatorSearchAbstractDocument $document,
|
||
|
$object) {
|
||
|
|
||
|
$blog = $object;
|
||
|
|
||
|
$document->setDocumentTitle($blog->getName());
|
||
|
|
||
|
$document->addField(
|
||
|
PhabricatorSearchDocumentFieldType::FIELD_BODY,
|
||
|
$blog->getDescription());
|
||
|
|
||
|
$document->addRelationship(
|
||
|
$blog->isArchived()
|
||
|
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
|
||
|
: PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
|
||
|
$blog->getPHID(),
|
||
|
PhabricatorPhameBlogPHIDType::TYPECONST,
|
||
|
PhabricatorTime::getNow());
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|