Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97255801
PhabricatorContentSourceView.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, Jan 3, 20:12
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 20:12 (2 d)
Engine
blob
Format
Raw Data
Handle
23366333
Attached To
rPH Phabricator
PhabricatorContentSourceView.php
View Options
<?php
final
class
PhabricatorContentSourceView
extends
AphrontView
{
private
$contentSource
;
public
function
setContentSource
(
PhabricatorContentSource
$content_source
)
{
$this
->
contentSource
=
$content_source
;
return
$this
;
}
public
function
render
()
{
require_celerity_resource
(
'phabricator-content-source-view-css'
);
$map
=
array
(
PhabricatorContentSource
::
SOURCE_WEB
=>
pht
(
'Web'
),
PhabricatorContentSource
::
SOURCE_CONDUIT
=>
pht
(
'Conduit'
),
PhabricatorContentSource
::
SOURCE_EMAIL
=>
pht
(
'Email'
),
PhabricatorContentSource
::
SOURCE_MOBILE
=>
pht
(
'Mobile'
),
PhabricatorContentSource
::
SOURCE_TABLET
=>
pht
(
'Tablet'
),
PhabricatorContentSource
::
SOURCE_FAX
=>
pht
(
'Fax'
),
PhabricatorContentSource
::
SOURCE_LEGACY
=>
pht
(
'Old World'
),
);
$source
=
$this
->
contentSource
->
getSource
();
$type
=
idx
(
$map
,
$source
,
null
);
if
(!
$type
)
{
return
null
;
}
return
phutil_tag
(
'span'
,
array
(
'class'
=>
"phabricator-content-source-view"
,
),
"Via {$type}"
);
}
}
Event Timeline
Log In to Comment