Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1103152
PhabricatorProjectsFulltextEngineExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
941 B
Referenced Files
None
Subscribers
None
PhabricatorProjectsFulltextEngineExtension.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 30, 5:29 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
268554
Default Alt Text
PhabricatorProjectsFulltextEngineExtension.php (941 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment