Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94961345
ManiphestTaskFulltextEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Dec 11, 18:00
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Dec 13, 18:00 (2 d)
Engine
blob
Format
Raw Data
Handle
22906366
Attached To
rPH Phabricator
ManiphestTaskFulltextEngine.php
View Options
<?php
final
class
ManiphestTaskFulltextEngine
extends
PhabricatorFulltextEngine
{
protected
function
buildAbstractDocument
(
PhabricatorSearchAbstractDocument
$document
,
$object
)
{
$task
=
$object
;
$document
->
setDocumentTitle
(
$task
->
getTitle
());
$document
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$task
->
getDescription
());
$document
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$task
->
getAuthorPHID
(),
PhabricatorPeopleUserPHIDType
::
TYPECONST
,
$task
->
getDateCreated
());
$document
->
addRelationship
(
$task
->
isClosed
()
?
PhabricatorSearchRelationship
::
RELATIONSHIP_CLOSED
:
PhabricatorSearchRelationship
::
RELATIONSHIP_OPEN
,
$task
->
getPHID
(),
ManiphestTaskPHIDType
::
TYPECONST
,
PhabricatorTime
::
getNow
());
$owner
=
$task
->
getOwnerPHID
();
if
(
$owner
)
{
$document
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_OWNER
,
$owner
,
PhabricatorPeopleUserPHIDType
::
TYPECONST
,
time
());
}
else
{
$document
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_UNOWNED
,
$task
->
getPHID
(),
PhabricatorPHIDConstants
::
PHID_TYPE_VOID
,
$task
->
getDateCreated
());
}
}
}
Event Timeline
Log In to Comment