Class CLinkColumn
CLinkColumn represents a grid view column that renders a hyperlink in each of its data cells.
The CLinkColumn::$label
and CLinkColumn::$url
properties determine how each hyperlink
will be rendered. The CLinkColumn::$labelExpression
, CLinkColumn::$urlExpression
properties
may be used instead if they are available. In addition, if CLinkColumn::$imageUrl
is
set, an image link will be rendered.
- CComponent
- CGridColumn
- CLinkColumn
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.1
Located at x2engine/framework/zii/widgets/grid/CLinkColumn.php
public
string
|
#
getDataCellContent( integer $row )
Returns the data cell content. This method renders a hyperlink in the data cell. |
public
string
|
$label | 'Link' |
#
the label to the hyperlinks in the data cells. Note that the label will not
be HTML-encoded when rendering. This property is ignored if |
public
string
|
$labelExpression |
|
#
a PHP expression that will be evaluated for every data cell and whose result
will be rendered as the label of the hyperlink of the data cell. In this
expression, you can use the following variables:
CComponent::evaluateExpression() .
A PHP expression can be any PHP code that has a value. To learn more about what an expression is, please refer to the php manual. |
public
string
|
$imageUrl |
|
#
the URL to the image. If this is set, an image link will be rendered. |
public
string
|
$url | 'javascript:void(0)' |
#
the URL of the hyperlinks in the data cells. This property is ignored if
|
public
string
|
$urlExpression |
|
#
a PHP expression that will be evaluated for every data cell and whose result
will be rendered as the URL of the hyperlink of the data cells. In this
expression, you can use the following variables:
CComponent::evaluateExpression() .
A PHP expression can be any PHP code that has a value. To learn more about what an expression is, please refer to the php manual. |
public
array
|
$htmlOptions | array('class'=>'link-column') |
#
the HTML options for the data cell tags. |
public
array
|
$headerHtmlOptions | array('class'=>'link-column') |
#
the HTML options for the header cell tag. |
public
array
|
$footerHtmlOptions | array('class'=>'link-column') |
#
the HTML options for the footer cell tag. |
public
array
|
$linkHtmlOptions | array() |
#
the HTML options for the hyperlinks |
$cssClassExpression,
$filterHtmlOptions,
$footer,
$grid,
$header,
$id,
$visible
|
$filterCellContent,
$footerCellContent,
$hasFooter,
$headerCellContent
|