Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99625536
PhabricatorPinboardItemView.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
Sat, Jan 25, 20:36
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 27, 20:36 (2 d)
Engine
blob
Format
Raw Data
Handle
23834996
Attached To
rPH Phabricator
PhabricatorPinboardItemView.php
View Options
<?php
final
class
PhabricatorPinboardItemView
extends
AphrontView
{
private
$imageURI
;
private
$uri
;
private
$header
;
private
$imageWidth
;
private
$imageHeight
;
public
function
setHeader
(
$header
)
{
$this
->
header
=
$header
;
return
$this
;
}
public
function
setURI
(
$uri
)
{
$this
->
uri
=
$uri
;
return
$this
;
}
public
function
setImageURI
(
$image_uri
)
{
$this
->
imageURI
=
$image_uri
;
return
$this
;
}
public
function
setImageSize
(
$x
,
$y
)
{
$this
->
imageWidth
=
$x
;
$this
->
imageHeight
=
$y
;
return
$this
;
}
public
function
render
()
{
$header
=
null
;
if
(
$this
->
header
)
{
$header
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-pinboard-item-header'
,
),
phutil_tag
(
'a'
,
array
(
'href'
=>
$this
->
uri
),
$this
->
header
));
}
$image
=
phutil_tag
(
'a'
,
array
(
'href'
=>
$this
->
uri
,
'class'
=>
'phabricator-pinboard-item-image-link'
,
),
phutil_tag
(
'img'
,
array
(
'src'
=>
$this
->
imageURI
,
'width'
=>
$this
->
imageWidth
,
'height'
=>
$this
->
imageHeight
,
)));
$content
=
$this
->
renderChildren
();
if
(
$content
)
{
$content
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-pinboard-item-content'
,
),
$content
);
}
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-pinboard-item-view'
,
),
$this
->
renderSingleView
(
array
(
$header
,
$image
,
$content
,
)));
}
}
Event Timeline
Log In to Comment