Class \Prado\Web\UI\WebControls\TImageMap
TImageMap represents an image on a page. Hotspot regions can be defined within the image. Depending on the \Prado\Web\UI\WebControls\setHotSpotMode, clicking on the hotspots may trigger a postback or navigate to a specified URL. The hotspots defined may be accessed via \Prado\Web\UI\WebControls\getHotSpots. Each hotspot is described as a THotSpot, which can be a circle, rectangle, polygon, etc. To add hotspot in a template, use the following,
<com:TImageMap>
<com:TCircleHotSpot ... />
<com:TRectangleHotSpot ... />
<com:TPolygonHotSpot ... />
</com:TImageMap>
Class hierarchy
- \Prado\Web\UI\WebControls\TImageMap implements IPostBackEventHandler
- \Prado\Web\UI\WebControls\TImage implements IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
addParsedObject(TComponent|string $object) : mixed
Processes an object that is created during parsing template.
This method adds THotSpot objects into the hotspot collection of the imagemap. |
public
|
|
public
|
|
public
|
|
public
|
onClick(TImageMapEventParameter $param) : mixed
Raises <b>OnClick</b> event.
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
|
raisePostBackEvent(TEventParameter $param) : mixed
Raises the postback event.
This method is required by IPostBackEventHandler interface. This method is mainly used by framework and control developers. |
public
|
|
public
|
setHotSpotMode(THotSpotMode $value) : mixed
Sets the behavior of hotspot regions in this imagemap when they are clicked.
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
|
|
protected
|
addAttributesToRender(THtmlWriter $writer) : mixed
Adds attribute name-value pairs to renderer.
This overrides the parent implementation with additional imagemap specific attributes. |
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
This method overrides the parent implementation. |
public
mixed
|
MAP_NAME_PREFIX
|
'ImageMap'
|