Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F989584
PhabricatorSourceDocumentEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
699 B
Referenced Files
None
Subscribers
None
PhabricatorSourceDocumentEngine.php
View Options
<?php
final
class
PhabricatorSourceDocumentEngine
extends
PhabricatorTextDocumentEngine
{
const
ENGINEKEY
=
'source'
;
public
function
getViewAsLabel
(
PhabricatorDocumentRef
$ref
)
{
return
pht
(
'View as Source'
);
}
protected
function
getDocumentIconIcon
(
PhabricatorDocumentRef
$ref
)
{
return
'fa-code'
;
}
protected
function
getContentScore
(
PhabricatorDocumentRef
$ref
)
{
return
1500
;
}
protected
function
newDocumentContent
(
PhabricatorDocumentRef
$ref
)
{
$content
=
$this
->
loadTextData
(
$ref
);
$content
=
PhabricatorSyntaxHighlighter
::
highlightWithFilename
(
$ref
->
getName
(),
$content
);
return
$this
->
newTextDocumentContent
(
$content
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 8:26 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
238849
Default Alt Text
PhabricatorSourceDocumentEngine.php (699 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment