Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97905110
PholioSearchIndexer.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
Tue, Jan 7, 10:06
Size
910 B
Mime Type
text/x-php
Expires
Thu, Jan 9, 10:06 (2 d)
Engine
blob
Format
Raw Data
Handle
23436700
Attached To
rPH Phabricator
PholioSearchIndexer.php
View Options
<?php
/**
* @group pholio
*/
final
class
PholioSearchIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
function
getIndexableObject
()
{
return
new
PholioMock
();
}
protected
function
buildAbstractDocumentByPHID
(
$phid
)
{
$mock
=
$this
->
loadDocumentByPHID
(
$phid
);
$doc
=
new
PhabricatorSearchAbstractDocument
();
$doc
->
setPHID
(
$mock
->
getPHID
());
$doc
->
setDocumentType
(
phid_get_type
(
$mock
->
getPHID
()));
$doc
->
setDocumentTitle
(
$mock
->
getName
());
$doc
->
setDocumentCreated
(
$mock
->
getDateCreated
());
$doc
->
setDocumentModified
(
$mock
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchField
::
FIELD_BODY
,
$mock
->
getDescription
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$mock
->
getAuthorPHID
(),
PhabricatorPHIDConstants
::
PHID_TYPE_USER
,
$mock
->
getDateCreated
());
return
$doc
;
}
}
Event Timeline
Log In to Comment