Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100700731
DivinerBookSearchIndexer.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, 00:26
Size
913 B
Mime Type
text/x-php
Expires
Tue, Feb 4, 00:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24016868
Attached To
rPH Phabricator
DivinerBookSearchIndexer.php
View Options
<?php
final
class
DivinerBookSearchIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
function
getIndexableObject
()
{
return
new
DivinerLiveBook
();
}
protected
function
buildAbstractDocumentByPHID
(
$phid
)
{
$book
=
$this
->
loadDocumentByPHID
(
$phid
);
$doc
=
$this
->
newDocument
(
$phid
)
->
setDocumentTitle
(
$book
->
getTitle
())
->
setDocumentCreated
(
$book
->
getDateCreated
())
->
setDocumentModified
(
$book
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$book
->
getPreface
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_REPOSITORY
,
$book
->
getRepositoryPHID
(),
PhabricatorRepositoryRepositoryPHIDType
::
TYPECONST
,
$book
->
getDateCreated
());
$this
->
indexTransactions
(
$doc
,
new
DivinerLiveBookTransactionQuery
(),
array
(
$phid
));
return
$doc
;
}
}
Event Timeline
Log In to Comment