Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548351
PhabricatorProjectFulltextEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorProjectFulltextEngine.php
View Options
<?php
final
class
PhabricatorProjectFulltextEngine
extends
PhabricatorFulltextEngine
{
protected
function
buildAbstractDocument
(
PhabricatorSearchAbstractDocument
$document
,
$object
)
{
$project
=
$object
;
$viewer
=
$this
->
getViewer
();
// Reload the project to get slugs.
$project
=
id
(
new
PhabricatorProjectQuery
())
->
withIDs
(
array
(
$project
->
getID
()))
->
setViewer
(
$viewer
)
->
needSlugs
(
true
)
->
executeOne
();
$project
->
updateDatasourceTokens
();
$slugs
=
array
();
foreach
(
$project
->
getSlugs
()
as
$slug
)
{
$slugs
[]
=
$slug
->
getSlug
();
}
$body
=
implode
(
"
\n
"
,
$slugs
);
$document
->
setDocumentTitle
(
$project
->
getDisplayName
())
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$body
);
$document
->
addRelationship
(
$project
->
isArchived
()
?
PhabricatorSearchRelationship
::
RELATIONSHIP_CLOSED
:
PhabricatorSearchRelationship
::
RELATIONSHIP_OPEN
,
$project
->
getPHID
(),
PhabricatorProjectProjectPHIDType
::
TYPECONST
,
PhabricatorTime
::
getNow
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:47 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
98134
Default Alt Text
PhabricatorProjectFulltextEngine.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment