Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / fund / search / FundInitiativeFulltextEngine.php
blob177d76bd4de05a85ab46104feddb2e28cdae2522
1 <?php
3 final class FundInitiativeFulltextEngine
4 extends PhabricatorFulltextEngine {
6 protected function buildAbstractDocument(
7 PhabricatorSearchAbstractDocument $document,
8 $object) {
10 $initiative = $object;
12 $document->setDocumentTitle($initiative->getName());
14 $document->addRelationship(
15 PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR,
16 $initiative->getOwnerPHID(),
17 PhabricatorPeopleUserPHIDType::TYPECONST,
18 $initiative->getDateCreated());
20 $document->addRelationship(
21 PhabricatorSearchRelationship::RELATIONSHIP_OWNER,
22 $initiative->getOwnerPHID(),
23 PhabricatorPeopleUserPHIDType::TYPECONST,
24 $initiative->getDateCreated());
26 $document->addRelationship(
27 $initiative->isClosed()
28 ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
29 : PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
30 $initiative->getPHID(),
31 FundInitiativePHIDType::TYPECONST,
32 PhabricatorTime::getNow());