Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81523869
PhabricatorFileDocumentRenderingEngine.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
Fri, Sep 6, 13:17
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 8, 13:17 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20588778
Attached To
rPH Phabricator
PhabricatorFileDocumentRenderingEngine.php
View Options
<?php
final
class
PhabricatorFileDocumentRenderingEngine
extends
PhabricatorDocumentRenderingEngine
{
protected
function
newRefViewURI
(
PhabricatorDocumentRef
$ref
,
PhabricatorDocumentEngine
$engine
)
{
$file
=
$ref
->
getFile
();
$engine_key
=
$engine
->
getDocumentEngineKey
();
return
urisprintf
(
'/file/view/%d/%s/'
,
$file
->
getID
(),
$engine_key
);
}
protected
function
newRefRenderURI
(
PhabricatorDocumentRef
$ref
,
PhabricatorDocumentEngine
$engine
)
{
$file
=
$ref
->
getFile
();
if
(!
$file
)
{
throw
new
PhutilMethodNotImplementedException
();
}
$engine_key
=
$engine
->
getDocumentEngineKey
();
$file_phid
=
$file
->
getPHID
();
return
urisprintf
(
'/file/document/%s/%s/'
,
$engine_key
,
$file_phid
);
}
protected
function
addApplicationCrumbs
(
PHUICrumbsView
$crumbs
,
PhabricatorDocumentRef
$ref
=
null
)
{
if
(
$ref
)
{
$file
=
$ref
->
getFile
();
if
(
$file
)
{
$crumbs
->
addTextCrumb
(
$file
->
getMonogram
(),
$file
->
getInfoURI
());
}
}
}
}
Event Timeline
Log In to Comment