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
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode 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 méthode

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

addParsedObject() public méthode

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

getClientClassName() protected méthode

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

getHotSpotMode() public méthode

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

getHotSpots() public méthode

public getHotSpots ( ) : THotSpotCollection
Résultat THotSpotCollection collection of hotspots defined in this imagemap.

getTarget() public méthode

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

onClick() public méthode

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 méthode

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

render() public méthode

Renders this imagemap.
public render ( $writer )

setHotSpotMode() public méthode

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 méthode

public setTarget ( $value )