SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatToolLink
public class SwatToolLink
extends SwatControl
| Field Summary | |
|---|---|
| string | Access key for this link. |
| string | Optional content type for the title of the link default text/plain use text/xml for XHTML fragments. |
| string | The href attribute in the XHTML anchor tag. |
| protected string | A CSS class set by the stock_id of this tool link. |
| string | The stock id of this tool link. |
| string | The title of this link. |
| mixed | A value or array of values to substitute into the link of this cell. |
| Constructor Summary | |
|---|---|
SwatToolLink(string id) Creates a new toollink. |
|
| Method Summary | |
|---|---|
| void | display() Displays this tool link. |
| protected array | Gets the array of CSS classes that are applied to this tool link. |
| protected SwatHtmlTag | Gets the tag used to display this tool link when it is not sensitive. |
| protected SwatHtmlTag | Gets the tag used to display this tool link when it is sensitive. |
| void | init() Initializes this widget. |
| void | setFromStock(string stock_id, boolean overwrite_properties) Sets the values of this tool link to a stock type. |
| 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 | |
public string $access_key = null
Access key for this link
Specifying an access key makes this tool link keyboard-accessible.
public string $content_type = 'text/plain'
Optional content type for the title of the link default text/plain use text/xml for XHTML fragments
public string $link = null
The href attribute in the XHTML anchor tag
Optionally uses vsprintf() syntax, for example:
<?php
$tool_link->link = 'MySection/MyPage/%s?id=%s';
?>
protected string $stock_class = null
A CSS class set by the stock_id of this tool link
public string $stock_id = null
The stock id of this tool link
Specifying a stock id initializes this tool link with a set of stock values.
public string $title = null
The title of this link
public mixed $value = null
A value or array of values to substitute into the link of this cell
The value property may be specified either as an array of values or as
a single value. If an array is passed, a call to vsprintf() is done
on the SwatToolLink::$link property. If the value is a string
a single sprintf() call is made.
public SwatToolLink(string id)
Creates a new toollink
id - a non-visible unique id for this widget.public void display()
Displays this tool link
protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this tool link
protected SwatHtmlTag getInsensitiveTag()
Gets the tag used to display this tool link when it is not sensitive
protected SwatHtmlTag getSensitiveTag()
Gets the tag used to display this tool link when it is sensitive
public void init()
Initializes this widget
Loads properties from stock if $stock_id is set.
public void setFromStock(string stock_id, boolean overwrite_properties)
Sets the values of this tool link to a stock type
Valid stock type ids are:
stock_id - the identifier of the stock type to use.overwrite_properties - whether to overwrite properties if they are already set.
A a tool link in the widget tree