PHP Class Prado\Web\UI\WebControls\TStyle

TStyle encapsulates the CSS style applied to a control.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\TComponent
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
__clone ( ) Need to clone the font object.
__construct ( $style = null ) Constructor.
addAttributesToRender ( $writer ) Adds attributes related to CSS styles to renderer.
clearStyleField ( $name ) Clears a single style field value;
copyFrom ( $style ) Copies the fields in a new style to this style.
getBackColor ( ) : string
getBorderColor ( ) : string
getBorderStyle ( ) : string
getBorderWidth ( ) : string
getCssClass ( ) : string
getCustomStyle ( ) : string
getDisplayStyle ( ) : TDisplayStyle
getFont ( ) : TFont
getForeColor ( ) : string
getHeight ( ) : string
getStyleField ( $name ) : string
getStyleFields ( ) : array
getWidth ( ) : string
hasCssClass ( ) : boolean
hasFont ( ) : boolean
hasStyleField ( $name ) : boolean
mergeWith ( $style ) Merges the style with a new one.
reset ( ) Resets the style to the original empty state.
setBackColor ( $value )
setBorderColor ( $value )
setBorderStyle ( $value ) Sets the border style of the control.
setBorderWidth ( $value )
setCssClass ( $value )
setCustomStyle ( $value ) Sets custom style fields from a string.
setDisplayStyle ( $value )
setForeColor ( $value )
setHeight ( $value )
setStyleField ( $name, $value ) Sets a single style field value.
setWidth ( $value )

Méthodes protégées

Méthode Description
_getZappableSleepProps ( &$exprops ) Returns an array with the names of all variables of this object that should NOT be serialized because their value is the default one or useless to be cached for the next page loads.

Method Details

__clone() public méthode

Need to clone the font object.
public __clone ( )

__construct() public méthode

Constructor.
public __construct ( $style = null )

_getZappableSleepProps() protected méthode

Reimplement in derived classes to add new variables, but remember to also to call the parent implementation first.
protected _getZappableSleepProps ( &$exprops )

addAttributesToRender() public méthode

Adds attributes related to CSS styles to renderer.
public addAttributesToRender ( $writer )

clearStyleField() public méthode

Clears a single style field value;
public clearStyleField ( $name )

copyFrom() public méthode

If a style field is set in the new style, the corresponding field in this style will be overwritten.
public copyFrom ( $style )

getBackColor() public méthode

public getBackColor ( ) : string
Résultat string the background color of the control

getBorderColor() public méthode

public getBorderColor ( ) : string
Résultat string the border color of the control

getBorderStyle() public méthode

public getBorderStyle ( ) : string
Résultat string the border style of the control

getBorderWidth() public méthode

public getBorderWidth ( ) : string
Résultat string the border width of the control

getCssClass() public méthode

public getCssClass ( ) : string
Résultat string the CSS class of the control

getCustomStyle() public méthode

public getCustomStyle ( ) : string
Résultat string the custom style of the control

getDisplayStyle() public méthode

public getDisplayStyle ( ) : TDisplayStyle
Résultat TDisplayStyle display style

getFont() public méthode

public getFont ( ) : TFont
Résultat TFont the font of the control

getForeColor() public méthode

public getForeColor ( ) : string
Résultat string the foreground color of the control

getHeight() public méthode

public getHeight ( ) : string
Résultat string the height of the control

getStyleField() public méthode

public getStyleField ( $name ) : string
Résultat string a single style field value set via {@link setStyleField}. Defaults to empty string.

getStyleFields() public méthode

public getStyleFields ( ) : array
Résultat array list of style fields.

getWidth() public méthode

public getWidth ( ) : string
Résultat string the width of the control

hasCssClass() public méthode

public hasCssClass ( ) : boolean
Résultat boolean true if CSS is set or empty.

hasFont() public méthode

public hasFont ( ) : boolean
Résultat boolean true if font is set.

hasStyleField() public méthode

public hasStyleField ( $name ) : boolean
Résultat boolean whether a style field has been defined by {@link setStyleField}

mergeWith() public méthode

If a style field is not set in this style, it will be overwritten by the new one.
public mergeWith ( $style )

reset() public méthode

Resets the style to the original empty state.
public reset ( )

setBackColor() public méthode

public setBackColor ( $value )

setBorderColor() public méthode

public setBorderColor ( $value )

setBorderStyle() public méthode

Sets the border style of the control.
public setBorderStyle ( $value )

setBorderWidth() public méthode

public setBorderWidth ( $value )

setCssClass() public méthode

public setCssClass ( $value )

setCustomStyle() public méthode

Custom style fields will be overwritten by style fields explicitly defined.
public setCustomStyle ( $value )

setDisplayStyle() public méthode

public setDisplayStyle ( $value )

setForeColor() public méthode

public setForeColor ( $value )

setHeight() public méthode

public setHeight ( $value )

setStyleField() public méthode

Style fields set by this method will overwrite those set by {@link setCustomStyle}.
public setStyleField ( $name, $value )

setWidth() public méthode

public setWidth ( $value )