Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99302074
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
Thu, Jan 23, 06:28
Size
913 B
Mime Type
text/x-php
Expires
Sat, Jan 25, 06:28 (2 d)
Engine
blob
Format
Raw Data
Handle
23727451
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