Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123789587
DivinerAtomSearchIndexer.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, 14:32
Size
803 B
Mime Type
text/x-php
Expires
Thu, Jul 31, 14:32 (2 d)
Engine
blob
Format
Raw Data
Handle
27755171
Attached To
rPH Phabricator
DivinerAtomSearchIndexer.php
View Options
<?php
final
class
DivinerAtomSearchIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
function
getIndexableObject
()
{
return
new
DivinerLiveSymbol
();
}
protected
function
buildAbstractDocumentByPHID
(
$phid
)
{
$atom
=
$this
->
loadDocumentByPHID
(
$phid
);
$book
=
$atom
->
getBook
();
$doc
=
$this
->
newDocument
(
$phid
)
->
setDocumentTitle
(
$atom
->
getTitle
())
->
setDocumentCreated
(
$book
->
getDateCreated
())
->
setDocumentModified
(
$book
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$atom
->
getSummary
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_BOOK
,
$atom
->
getBookPHID
(),
DivinerBookPHIDType
::
TYPECONST
,
$book
->
getDateCreated
());
return
$doc
;
}
}
Event Timeline
Log In to Comment