Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F536319
PhameDescriptionView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhameDescriptionView.php
View Options
<?php
final
class
PhameDescriptionView
extends
AphrontTagView
{
private
$title
;
private
$description
;
private
$image
;
private
$imageHref
;
public
function
setTitle
(
$title
)
{
$this
->
title
=
$title
;
return
$this
;
}
public
function
setDescription
(
$description
)
{
$this
->
description
=
$description
;
return
$this
;
}
public
function
setImage
(
$image
)
{
$this
->
image
=
$image
;
return
$this
;
}
public
function
setImageHref
(
$href
)
{
$this
->
imageHref
=
$href
;
return
$this
;
}
protected
function
getTagAttributes
()
{
$classes
=
array
();
$classes
[]
=
'phame-blog-description'
;
return
array
(
'class'
=>
implode
(
' '
,
$classes
));
}
protected
function
getTagContent
()
{
require_celerity_resource
(
'phame-css'
);
$description
=
phutil_tag_div
(
'phame-blog-description-content'
,
$this
->
description
);
$image
=
phutil_tag
(
(
$this
->
imageHref
)
?
'a'
:
'div'
,
array
(
'class'
=>
'phame-blog-description-image'
,
'style'
=>
'background-image: url('
.
$this
->
image
.
');'
,
'href'
=>
$this
->
imageHref
,
));
$header
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'phame-blog-description-name'
,
),
$this
->
title
);
return
array
(
$image
,
$header
,
$description
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 7:04 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
107840
Default Alt Text
PhameDescriptionView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment