PHP Class Prado\Web\UI\WebControls\THyperLink

THyperLink displays a hyperlink on a page. The hyperlink URL is specified via the {@link setNavigateUrl NavigateUrl} property, and link text is via the {@link setText Text} property. It is also possible to display an image by setting the {@link setImageUrl ImageUrl} property. In this case, the alignment of the image displayed is set by the {@link setImageAlign ImageAlign} property and {@link getText Text} is displayed as the alternate text of the image. The link target is specified via the {@link setTarget Target} property. If both {@link getImageUrl ImageUrl} and {@link getText Text} are empty, the content enclosed within the control tag will be rendered.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TWebControl, implements Prado\IDataRenderer
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
getData ( ) : string Returns the URL to link to when the THyperLink component is clicked.
getImageAlign ( ) : string
getImageHeight ( ) : string
getImageUrl ( ) : string
getImageWidth ( ) : string
getNavigateUrl ( ) : string
getTarget ( ) : string
getText ( ) : string
renderContents ( $writer ) Renders the body content of the hyperlink.
setData ( $value ) Sets the URL to link to when the THyperLink component is clicked.
setImageAlign ( $value ) Sets the alignment of the image with respective to other elements on the page.
setImageHeight ( $value ) Sets the height of the image in the THyperLink
setImageUrl ( $value ) Sets the location of image file of the THyperLink.
setImageWidth ( $value ) Sets the width of the image in the THyperLink
setNavigateUrl ( $value ) Sets the URL to link to when the THyperLink component is clicked.
setTarget ( $value ) Sets the target window or frame to display the Web page content linked to when the THyperLink component is clicked.
setText ( $value ) Sets the text caption of the THyperLink.

Méthodes protégées

Méthode Description
addAttributesToRender ( $writer ) Adds attributes related to a hyperlink element to renderer.
createImage ( $imageUrl ) : TImage Gets the TImage for rendering the ImageUrl property. This is not for creating dynamic images.
getTagName ( ) : string

Method Details

addAttributesToRender() protected méthode

Adds attributes related to a hyperlink element to renderer.
protected addAttributesToRender ( $writer )

createImage() protected méthode

Gets the TImage for rendering the ImageUrl property. This is not for creating dynamic images.
protected createImage ( $imageUrl ) : TImage
Résultat TImage image control for rendering.

getData() public méthode

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link getText()}.
See also: getText
Since: 3.1.0
public getData ( ) : string
Résultat string the text caption

getImageAlign() public méthode

public getImageAlign ( ) : string
Résultat string the alignment of the image with respective to other elements on the page, defaults to empty.

getImageHeight() public méthode

public getImageHeight ( ) : string
Résultat string height of the image in the THyperLink

getImageUrl() public méthode

public getImageUrl ( ) : string
Résultat string the location of the image file for the THyperLink

getImageWidth() public méthode

public getImageWidth ( ) : string
Résultat string width of the image in the THyperLink

getNavigateUrl() public méthode

public getNavigateUrl ( ) : string
Résultat string the URL to link to when the THyperLink component is clicked.

getTagName() protected méthode

protected getTagName ( ) : string
Résultat string tag name of the hyperlink

getTarget() public méthode

public getTarget ( ) : string
Résultat string the target window or frame to display the Web page content linked to when the THyperLink component is clicked.

getText() public méthode

public getText ( ) : string
Résultat string the text caption of the THyperLink

renderContents() public méthode

Renders the body content of the hyperlink.
public renderContents ( $writer )

setData() public méthode

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link setText()}.
See also: setText
Since: 3.1.0
public setData ( $value )

setImageAlign() public méthode

Possible values include: absbottom, absmiddle, baseline, bottom, left, middle, right, texttop, and top. If an empty string is passed in, imagealign attribute will not be rendered.
public setImageAlign ( $value )

setImageHeight() public méthode

Sets the height of the image in the THyperLink
public setImageHeight ( $value )

setImageUrl() public méthode

Sets the location of image file of the THyperLink.
public setImageUrl ( $value )

setImageWidth() public méthode

Sets the width of the image in the THyperLink
public setImageWidth ( $value )

setNavigateUrl() public méthode

Sets the URL to link to when the THyperLink component is clicked.
public setNavigateUrl ( $value )

setTarget() public méthode

Sets the target window or frame to display the Web page content linked to when the THyperLink component is clicked.
public setTarget ( $value )

setText() public méthode

Sets the text caption of the THyperLink.
public setText ( $value )