PHP Class Prado\Web\UI\WebControls\TImageMap

TImageMap represents an image on a page. Hotspot regions can be defined within the image. Depending on the {@link setHotSpotMode HotSpotMode}, clicking on the hotspots may trigger a postback or navigate to a specified URL. The hotspots defined may be accessed via {@link getHotSpots HotSpots}. Each hotspot is described as a {@link THotSpot}, which can be a circle, rectangle, polygon, etc. To add hotspot in a template, use the following,
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TImage, implements Prado\Web\UI\IPostBackEventHandler
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
addParsedObject ( $object ) Processes an object that is created during parsing template.
getHotSpotMode ( ) : THotSpotMode
getHotSpots ( ) : THotSpotCollection
getTarget ( ) : string
onClick ( $param ) Raises OnClick event.
raisePostBackEvent ( $param ) Raises the postback event.
render ( $writer ) Renders this imagemap.
setHotSpotMode ( $value ) Sets the behavior of hotspot regions in this imagemap when they are clicked.
setTarget ( $value )

Protected Methods

Method Description
addAttributesToRender ( $writer ) Adds attribute name-value pairs to renderer.
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.

Method Details

addAttributesToRender() protected method

This overrides the parent implementation with additional imagemap specific attributes.
protected addAttributesToRender ( $writer )

addParsedObject() public method

This method adds {@link THotSpot} objects into the hotspot collection of the imagemap.
public addParsedObject ( $object )

getClientClassName() protected method

This method overrides the parent implementation.
protected getClientClassName ( ) : string
return string the javascript class name

getHotSpotMode() public method

public getHotSpotMode ( ) : THotSpotMode
return THotSpotMode the behavior of hotspot regions in this imagemap when they are clicked. Defaults to THotSpotMode::NotSet.

getHotSpots() public method

public getHotSpots ( ) : THotSpotCollection
return THotSpotCollection collection of hotspots defined in this imagemap.

getTarget() public method

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

onClick() public method

This method is invoked when a hotspot region is clicked within the imagemap. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
public onClick ( $param )

raisePostBackEvent() public method

This method is required by {@link IPostBackEventHandler} interface. This method is mainly used by framework and control developers.
public raisePostBackEvent ( $param )

render() public method

Renders this imagemap.
public render ( $writer )

setHotSpotMode() public method

If an individual hotspot has a mode other than 'NotSet', the mode set in this imagemap will be ignored. By default, 'NotSet' is equivalent to 'Navigate'.
public setHotSpotMode ( $value )

setTarget() public method

public setTarget ( $value )