PHP Class Prado\Web\UI\WebControls\THotSpot

THotSpot implements the basic functionality common to all hot spot shapes. Derived classes include {@link TCircleHotSpot}, {@link TPolygonHotSpot} and {@link TRectangleHotSpot}.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\TComponent
Mostrar archivo Open project: pradosoft/prado

Public Methods

Method Description
getAccessKey ( ) : string
getAlternateText ( ) : string
getAttribute ( $name ) : string
getAttributes ( ) : TAttributeCollection Returns the list of custom attributes.
getCausesValidation ( ) : boolean
getCoordinates ( ) : string
getHasAttributes ( ) : boolean
getHotSpotMode ( ) : THotSpotMode
getNavigateUrl ( ) : string
getPostBackValue ( ) : string
getShape ( ) : string
getTabIndex ( ) : integer
getTarget ( ) : string
getValidationGroup ( ) : string
hasAttribute ( $name ) : boolean
removeAttribute ( $name ) : string Removes the named attribute.
render ( $writer ) Renders this hotspot.
setAccessKey ( $value )
setAlternateText ( $value )
setAttribute ( $name, $value ) Sets a custom hotspot attribute.
setCausesValidation ( $value )
setHotSpotMode ( $value )
setNavigateUrl ( $value )
setPostBackValue ( $value )
setTabIndex ( $value )
setTarget ( $value )
setValidationGroup ( $value )

Protected Methods

Method Description
getViewState ( $key, $defaultValue = null ) : mixed Returns a viewstate value.
setViewState ( $key, $value, $defaultValue = null ) Sets a viewstate value.

Method Details

getAccessKey() public method

public getAccessKey ( ) : string
return string the access key that allows you to quickly navigate to the HotSpot region. Defaults to ''.

getAlternateText() public method

public getAlternateText ( ) : string
return string the alternate text to display for a HotSpot object. Defaults to ''.

getAttribute() public method

public getAttribute ( $name ) : string
return string attribute value, null if attribute does not exist

getAttributes() public method

Custom attributes are name-value pairs that may be rendered as HTML tags' attributes.
public getAttributes ( ) : TAttributeCollection
return Prado\Collections\TAttributeCollection the list of custom attributes

getCausesValidation() public method

public getCausesValidation ( ) : boolean
return boolean whether postback event trigger by this hotspot will cause input validation, default is true

getCoordinates() abstract public method

abstract public getCoordinates ( ) : string
return string coordinates defining the hotspot shape.

getHasAttributes() public method

public getHasAttributes ( ) : boolean
return boolean whether the hotspot has custom attributes

getHotSpotMode() public method

public getHotSpotMode ( ) : THotSpotMode
return THotSpotMode the behavior of a HotSpot object when it is clicked. Defaults to THotSpotMode::NotSet.

getNavigateUrl() public method

public getNavigateUrl ( ) : string
return string the URL to navigate to when a HotSpot object is clicked. Defaults to ''.

getPostBackValue() public method

public getPostBackValue ( ) : string
return string a value that is post back when the HotSpot is clicked. Defaults to ''.

getShape() abstract public method

abstract public getShape ( ) : string
return string shape of the hotspot, can be 'circle', 'rect', 'poly', etc.

getTabIndex() public method

public getTabIndex ( ) : integer
return integer the tab index of the HotSpot region. Defaults to 0.

getTarget() public method

public getTarget ( ) : string
return string the target window or frame to display the new page when the HotSpot region is clicked. Defaults to ''.

getValidationGroup() public method

public getValidationGroup ( ) : string
return string the group of validators which the hotspot causes validation upon postback

getViewState() protected method

This function is very useful in defining getter functions for component properties that must be kept in viewstate.
protected getViewState ( $key, $defaultValue = null ) : mixed
return mixed the viewstate value corresponding to $key

hasAttribute() public method

public hasAttribute ( $name ) : boolean
return boolean whether the named attribute exists

removeAttribute() public method

Removes the named attribute.
public removeAttribute ( $name ) : string
return string attribute value removed, null if attribute does not exist.

render() public method

Renders this hotspot.
public render ( $writer )

setAccessKey() public method

public setAccessKey ( $value )

setAlternateText() public method

public setAlternateText ( $value )

setAttribute() public method

Sets a custom hotspot attribute.
public setAttribute ( $name, $value )

setCausesValidation() public method

public setCausesValidation ( $value )

setHotSpotMode() public method

public setHotSpotMode ( $value )

setNavigateUrl() public method

public setNavigateUrl ( $value )

setPostBackValue() public method

public setPostBackValue ( $value )

setTabIndex() public method

public setTabIndex ( $value )

setTarget() public method

public setTarget ( $value )

setValidationGroup() public method

public setValidationGroup ( $value )

setViewState() protected method

This function is very useful in defining setter functions for control properties that must be kept in viewstate. Make sure that the viewstate value must be serializable and unserializable.
protected setViewState ( $key, $value, $defaultValue = null )