Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1531806
PHUIButtonBarView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
925 B
Referenced Files
None
Subscribers
None
PHUIButtonBarView.php
View Options
<?php
final
class
PHUIButtonBarView
extends
AphrontTagView
{
private
$buttons
=
array
();
public
function
addButton
(
$button
)
{
$this
->
buttons
[]
=
$button
;
return
$this
;
}
protected
function
getTagAttributes
()
{
return
array
(
'class'
=>
'phui-button-bar'
);
}
public
function
getTagName
()
{
return
'div'
;
}
public
function
getTagContent
()
{
require_celerity_resource
(
'phui-button-css'
);
$i
=
1
;
$j
=
count
(
$this
->
buttons
);
foreach
(
$this
->
buttons
as
$button
)
{
// LeeLoo Dallas Multi-Pass
if
(
$j
>
1
)
{
if
(
$i
==
1
)
{
$button
->
addClass
(
'phui-button-bar-first'
);
}
else
if
(
$i
==
$j
)
{
$button
->
addClass
(
'phui-button-bar-last'
);
}
else
if
(
$j
>
1
)
{
$button
->
addClass
(
'phui-button-bar-middle'
);
}
}
$this
->
appendChild
(
$button
);
$i
++;
}
return
$this
->
renderChildren
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jul 14, 5:47 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
354675
Default Alt Text
PHUIButtonBarView.php (925 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment