silverorange Code


Swat.SwatImageButton
/Swat/SwatImageButton.php at line 17

Class SwatImageButton

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatButton
└─SwatImageButton

public class SwatImageButton
extends SwatButton

An image button widget

This widget displays as an XHTML form image button, so it must be used within SwatForm.

Copyright:
2008 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
string

$image

Image.

array

$values

Optional array of values to substitute into the image property.

Fields inherited from Swat.SwatButton
access_key, clicked, confirmation_message, processing_throbber_message, show_processing_throbber, stock_class, stock_id, tab_index, title
Fields inherited from Swat.SwatInputControl
required
Method Summary
void

display()

Displays this image button.

protected array

getCSSClassNames()

Gets the array of CSS classes that are applied to this button.

void

process()

Does button processing.

Methods inherited from Swat.SwatButton
display, getCSSClassNames, getInlineJavaScript, getJavaScriptClass, hasBeenClicked, init, process, setFromStock
Methods inherited from Swat.SwatInputControl
getForm, init
Methods inherited from Swat.SwatControl
addMessage, getNote, printWidgetTree
Methods inherited from Swat.SwatWidget
addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer
Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Field Detail

/Swat/SwatImageButton.php at line 28

image

public string $image

Image

The src attribute in the XHTML input tag.


/Swat/SwatImageButton.php at line 42

values

public array $values = array()

Optional array of values to substitute into the image property

Uses vsprintf() syntax, for example:

<?php
$my_image
->image 'mydir/%s.%s';
$my_image->values = array('myfilename''ext');
?>


Method Detail

/Swat/SwatImageButton.php at line 75

display

public void display()

Displays this image button

Outputs an XHTML input tag.


/Swat/SwatImageButton.php at line 119

getCSSClassNames

protected array getCSSClassNames()

Gets the array of CSS classes that are applied to this button

Returns:
the array of CSS classes that are applied to this button.
See Also:
SwatUIObject::getCSSClassString()

/Swat/SwatImageButton.php at line 54

process

public void process()

Does button processing

Sets whether this button has been clicked and also updates the form this button belongs to with a reference to this button if this button submitted the form.


silverorange Code