Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112063375
PhrictionContentSearchEngineAttachment.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
Wed, May 7, 10:26
Size
742 B
Mime Type
text/x-php
Expires
Fri, May 9, 10:26 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
26007867
Attached To
rPH Phabricator
PhrictionContentSearchEngineAttachment.php
View Options
<?php
final
class
PhrictionContentSearchEngineAttachment
extends
PhabricatorSearchEngineAttachment
{
public
function
getAttachmentName
()
{
return
pht
(
'Document Content'
);
}
public
function
getAttachmentDescription
()
{
return
pht
(
'Get the content of documents or document histories.'
);
}
public
function
getAttachmentForObject
(
$object
,
$data
,
$spec
)
{
if
(
$object
instanceof
PhrictionDocument
)
{
$content
=
$object
->
getContent
();
}
else
{
$content
=
$object
;
}
return
array
(
'title'
=>
$content
->
getTitle
(),
'path'
=>
$content
->
getSlug
(),
'authorPHID'
=>
$content
->
getAuthorPHID
(),
'content'
=>
array
(
'raw'
=>
$content
->
getContent
(),
),
);
}
}
Event Timeline
Log In to Comment