Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102677951
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
Sun, Feb 23, 04:17
Size
868 B
Mime Type
text/x-php
Expires
Tue, Feb 25, 04:17 (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
24357378
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
();
if
(!
$atom
->
getIsDocumentable
())
{
return
null
;
}
$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