PHP Class Prado\Web\UI\WebControls\TPanel

TPanel represents a component that acts as a container for other component. It is especially useful when you want to generate components programmatically or hide/show a group of components. By default, TPanel displays a <div> element on a page. Children of TPanel are displayed as the body content of the element. The property {@link setWrap Wrap} can be used to set whether the body content should wrap or not. {@link setHorizontalAlign HorizontalAlign} governs how the content is aligned horizontally, and {@link getDirection Direction} indicates the content direction (left to right or right to left). You can set {@link setBackImageUrl BackImageUrl} to give a background image to the panel, and you can ste {@link setGroupingText GroupingText} so that the panel is displayed as a field set with a legend text. Finally, you can specify a default button to be fired when users press 'return' key within the panel by setting the {@link setDefaultButton DefaultButton} property.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TWebControl
Mostra file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
getBackImageUrl ( ) : string
getDefaultButton ( ) : string
getDirection ( ) : string
getGroupingText ( ) : string
getHorizontalAlign ( ) : string
getScrollBars ( ) : string
getWrap ( ) : boolean
render ( $writer )
renderBeginTag ( $writer ) Renders the openning tag for the control (including attributes)
renderEndTag ( $writer ) Renders the closing tag for the control
setBackImageUrl ( $value ) Sets the URL of the background image for the panel component.
setDefaultButton ( $value ) Specifies the default button for the panel.
setDirection ( $value )
setGroupingText ( $value )
setHorizontalAlign ( $value ) Sets the horizontal alignment of the contents within the panel.
setScrollBars ( $value )
setWrap ( $value ) Sets the value indicating whether the content wraps within the panel.

Protected Methods

Method Description
addAttributesToRender ( $writer ) Adds attributes to renderer.
createStyle ( ) : TPanelStyle Creates a style object to be used by the control.
getTagName ( ) : string

Method Details

addAttributesToRender() protected method

Adds attributes to renderer.
protected addAttributesToRender ( $writer )

createStyle() protected method

This method overrides the parent impementation by creating a TPanelStyle object.
protected createStyle ( ) : TPanelStyle
return TPanelStyle the style used by TPanel.

getBackImageUrl() public method

public getBackImageUrl ( ) : string
return string the URL of the background image for the panel component.

getDefaultButton() public method

public getDefaultButton ( ) : string
return string the ID path to the default button. Defaults to empty.

getDirection() public method

public getDirection ( ) : string
return string alignment of the content in the panel. Defaults to 'NotSet'.

getGroupingText() public method

public getGroupingText ( ) : string
return string the legend text when the panel is used as a fieldset. Defaults to empty.

getHorizontalAlign() public method

public getHorizontalAlign ( ) : string
return string the horizontal alignment of the contents within the panel, defaults to 'NotSet'.

getScrollBars() public method

public getScrollBars ( ) : string
return string the visibility and position of scroll bars in a panel control, defaults to None.

getTagName() protected method

protected getTagName ( ) : string
return string tag name of the panel

getWrap() public method

public getWrap ( ) : boolean
return boolean whether the content wraps within the panel. Defaults to true.

render() public method

public render ( $writer )

renderBeginTag() public method

Renders the openning tag for the control (including attributes)
public renderBeginTag ( $writer )

renderEndTag() public method

Renders the closing tag for the control
public renderEndTag ( $writer )

setBackImageUrl() public method

Sets the URL of the background image for the panel component.
public setBackImageUrl ( $value )

setDefaultButton() public method

The default button will be fired (clicked) whenever a user enters 'return' key within the panel. The button must be locatable via the function call {@link TControl::findControl findControl}.
public setDefaultButton ( $value )

setDirection() public method

public setDirection ( $value )

setGroupingText() public method

public setGroupingText ( $value )

setHorizontalAlign() public method

Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
public setHorizontalAlign ( $value )

setScrollBars() public method

public setScrollBars ( $value )

setWrap() public method

Sets the value indicating whether the content wraps within the panel.
public setWrap ( $value )