Page MenuHomestyx hydra

PhabricatorProjectsFulltextEngineExtension.php
No OneTemporary

PhabricatorProjectsFulltextEngineExtension.php

<?php
final class PhabricatorProjectsFulltextEngineExtension
extends PhabricatorFulltextEngineExtension {
const EXTENSIONKEY = 'projects';
public function getExtensionName() {
return pht('Projects');
}
public function shouldIndexFulltextObject($object) {
return ($object instanceof PhabricatorProjectInterface);
}
public function indexFulltextObject(
$object,
PhabricatorSearchAbstractDocument $document) {
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
$object->getPHID(),
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
if (!$project_phids) {
return;
}
foreach ($project_phids as $project_phid) {
$document->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_PROJECT,
$project_phid,
PhabricatorProjectProjectPHIDType::TYPECONST,
$document->getDocumentModified()); // Bogus timestamp.
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Nov 26, 8:22 PM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
359990
Default Alt Text
PhabricatorProjectsFulltextEngineExtension.php (941 B)

Event Timeline