Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123733987
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, Jul 29, 08:21
Size
890 B
Mime Type
text/x-php
Expires
Thu, Jul 31, 08:21 (2 d)
Engine
blob
Format
Raw Data
Handle
27624050
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
=
$this
->
newDocument
(
$phid
)
->
setDocumentTitle
(
$mock
->
getName
())
->
setDocumentCreated
(
$mock
->
getDateCreated
())
->
setDocumentModified
(
$mock
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchField
::
FIELD_BODY
,
$mock
->
getDescription
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$mock
->
getAuthorPHID
(),
PhabricatorPeoplePHIDTypeUser
::
TYPECONST
,
$mock
->
getDateCreated
());
$this
->
indexTransactions
(
$doc
,
new
PholioTransactionQuery
(),
array
(
$phid
));
return
$doc
;
}
}
Event Timeline
Log In to Comment