Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CButtonColumn
  • CCheckBoxColumn
  • CDataColumn
  • CGridColumn
  • CGridView
  • CLinkColumn
  • X2CheckBoxColumn
  • X2DataColumnGeneric
  • Overview
  • Package
  • Class
  • Tree

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
Extended by CGridColumn
Extended by CLinkColumn
Package: zii\widgets\grid
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
Methods summary
public string
# getDataCellContent( integer $row )

Returns the data cell content. This method renders a hyperlink in the data cell.

Returns the data cell content. This method renders a hyperlink in the data cell.

Parameters

$row
integer
$row the row number (zero-based)

Returns

string
the data cell content.

Since

1.1.16

Overrides

CGridColumn::getDataCellContent()
Methods inherited from CGridColumn
__construct(), getFilterCellContent(), getFooterCellContent(), getHasFooter(), getHeaderCellContent(), init(), renderDataCell(), renderFilterCell(), renderFooterCell(), renderHeaderCell()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
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 CLinkColumn::$labelExpression is set.

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 CLinkColumn::$labelExpression is set.

See

CLinkColumn::$labelExpression
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:
  • <span class="php-var">$row</span> the row number (zero-based).
  • <span class="php-var">$data</span> the data model for the row.
  • <span class="php-var">$this</span> the column object.
The PHP expression will be evaluated using 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.

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:
  • <span class="php-var">$row</span> the row number (zero-based).
  • <span class="php-var">$data</span> the data model for the row.
  • <span class="php-var">$this</span> the column object.
The PHP expression will be evaluated using 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.

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 CLinkColumn::$urlExpression is set.

the URL of the hyperlinks in the data cells. This property is ignored if CLinkColumn::$urlExpression is set.

See

CLinkColumn::$urlExpression
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:
  • <span class="php-var">$row</span> the row number (zero-based).
  • <span class="php-var">$data</span> the data model for the row.
  • <span class="php-var">$this</span> the column object.
The PHP expression will be evaluated using 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.

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:
  • <span class="php-var">$row</span> the row number (zero-based).
  • <span class="php-var">$data</span> the data model for the row.
  • <span class="php-var">$this</span> the column object.
The PHP expression will be evaluated using 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.

the HTML options for the data cell tags.

public array $headerHtmlOptions array('class'=>'link-column')
#

the HTML options for the header cell tag.

the HTML options for the header cell tag.

public array $footerHtmlOptions array('class'=>'link-column')
#

the HTML options for the footer cell tag.

the HTML options for the footer cell tag.

public array $linkHtmlOptions array()
#

the HTML options for the hyperlinks

the HTML options for the hyperlinks

Properties inherited from CGridColumn
$cssClassExpression, $filterHtmlOptions, $footer, $grid, $header, $id, $visible
Magic properties inherited from CGridColumn
$filterCellContent, $footerCellContent, $hasFooter, $headerCellContent
API documentation generated by ApiGen 2.8.0