PHP Класс 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.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TWebControl, implements Prado\IDataRenderer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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

Описание методов

addAttributesToRender() защищенный Метод

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

createImage() защищенный Метод

Gets the TImage for rendering the ImageUrl property. This is not for creating dynamic images.
protected createImage ( $imageUrl ) : TImage
Результат TImage image control for rendering.

getData() публичный Метод

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link getText()}.
См. также: getText
С версии: 3.1.0
public getData ( ) : string
Результат string the text caption

getImageAlign() публичный Метод

public getImageAlign ( ) : string
Результат string the alignment of the image with respective to other elements on the page, defaults to empty.

getImageHeight() публичный Метод

public getImageHeight ( ) : string
Результат string height of the image in the THyperLink

getImageUrl() публичный Метод

public getImageUrl ( ) : string
Результат string the location of the image file for the THyperLink

getImageWidth() публичный Метод

public getImageWidth ( ) : string
Результат string width of the image in the THyperLink

getNavigateUrl() публичный Метод

public getNavigateUrl ( ) : string
Результат string the URL to link to when the THyperLink component is clicked.

getTagName() защищенный Метод

protected getTagName ( ) : string
Результат string tag name of the hyperlink

getTarget() публичный Метод

public getTarget ( ) : string
Результат string the target window or frame to display the Web page content linked to when the THyperLink component is clicked.

getText() публичный Метод

public getText ( ) : string
Результат string the text caption of the THyperLink

renderContents() публичный Метод

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

setData() публичный Метод

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link setText()}.
См. также: setText
С версии: 3.1.0
public setData ( $value )

setImageAlign() публичный Метод

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() публичный Метод

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

setImageUrl() публичный Метод

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

setImageWidth() публичный Метод

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

setNavigateUrl() публичный Метод

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

setTarget() публичный Метод

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

setText() публичный Метод

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