Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93202347
AphrontAbstractAttachedFileView.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
Tue, Nov 26, 23:59
Size
1016 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 23:59 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22588271
Attached To
rPH Phabricator
AphrontAbstractAttachedFileView.php
View Options
<?php
abstract
class
AphrontAbstractAttachedFileView
extends
AphrontView
{
private
$file
;
final
public
function
setFile
(
PhabricatorFile
$file
)
{
$this
->
file
=
$file
;
return
$this
;
}
final
protected
function
getFile
()
{
return
$this
->
file
;
}
final
protected
function
getName
()
{
$file
=
$this
->
getFile
();
return
phutil_tag
(
'a'
,
array
(
'href'
=>
$file
->
getViewURI
(),
'target'
=>
'_blank'
,
),
$file
->
getName
());
}
final
protected
function
getRemoveElement
()
{
$file
=
$this
->
getFile
();
return
javelin_tag
(
'a'
,
array
(
'class'
=>
'button grey'
,
'sigil'
=>
'aphront-attached-file-view-remove'
,
// NOTE: Using 'ref' here instead of 'meta' because the file upload
// endpoint doesn't receive request metadata and thus can't generate
// a valid response with node metadata.
'ref'
=>
$file
->
getPHID
(),
),
"
\x
E2
\x
9C
\x
96"
);
// "Heavy Multiplication X"
}
}
Event Timeline
Log In to Comment