Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100726883
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
Sun, Feb 2, 06:00
Size
878 B
Mime Type
text/x-php
Expires
Tue, Feb 4, 06:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24019576
Attached To
rPH Phabricator
PholioSearchIndexer.php
View Options
<?php
final
class
PholioSearchIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
function
getIndexableObject
()
{
return
new
PholioMock
();
}
protected
function
buildAbstractDocumentByPHID
(
$phid
)
{
$mock
=
$this
->
loadDocumentByPHID
(
$phid
);
$doc
=
$this
->
newDocument
(
$phid
)
->
setDocumentTitle
(
$mock
->
getName
())
->
setDocumentCreated
(
$mock
->
getDateCreated
())
->
setDocumentModified
(
$mock
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$mock
->
getDescription
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$mock
->
getAuthorPHID
(),
PhabricatorPeopleUserPHIDType
::
TYPECONST
,
$mock
->
getDateCreated
());
$this
->
indexTransactions
(
$doc
,
new
PholioTransactionQuery
(),
array
(
$phid
));
return
$doc
;
}
}
Event Timeline
Log In to Comment