YiiWheels
  • Package
  • Class
  • Tree

Packages

  • None
  • yiiwheels
    • behaviors
    • widgets
    • widgets
      • ace
      • box
      • datepicker
      • daterangepicker
      • datetimepicker
      • detail
      • fileupload
      • fileuploader
      • gallery
      • google
      • grid
        • behaviors
        • operations
      • highcharts
      • maskInput
      • maskmoney
      • modal
      • multiselect
      • rangeslider
      • redactor
      • select2
      • sparklines
      • switch
      • timeago
      • timepicker
      • toggle
      • typeahead

Classes

  • WhGridView
  • WhGroupGridView
  • WhImageColumn
  • WhRelationalColumn

Class WhRelationalColumn

TbDataColumn
Extended by WhRelationalColumn
Package: YiiWheels\widgets\grid
Copyright: Copyright © 2amigos.us 2013-
License: New BSD License
Author: Antonio Ramirez <amigo.cobos@gmail.com>
Located at widgets/grid/WhRelationalColumn.php

Methods summary

public
# init( )

widget initialization

widget initialization

public
# renderDataCell( integer $row )

Overrides CDataColumn renderDataCell in order to wrap up its content with the object that will be used as a trigger. Important: Making use of links as a content for this of column is an error.

Overrides CDataColumn renderDataCell in order to wrap up its content with the object that will be used as a trigger. Important: Making use of links as a content for this of column is an error.

Parameters

$row
integer
$row
protected null|string
# getPrimaryKey( CActiveRecord $data )

Helper function to return the primary key of the $data
* IMPORTANT: composite keys on CActiveDataProviders will return the keys joined by comma

Helper function to return the primary key of the $data * IMPORTANT: composite keys on CActiveDataProviders will return the keys joined by comma

Parameters

$data
CActiveRecord
$data

Returns

null|string
public
# registerClientScript( )

Register script that will handle its behavior

Register script that will handle its behavior

Magic methods summary

Properties summary

public string $url
#

$url the route to call via AJAX to get the data from

$url the route to call via AJAX to get the data from

public string $cssClass
#

$cssClass the class name that will wrap up the cell content. Important Note: this class will be used as the trigger for the AJAX call, so make sure is unique for the column.

$cssClass the class name that will wrap up the cell content. Important Note: this class will be used as the trigger for the AJAX call, so make sure is unique for the column.

public boolean $cacheData
#

$cacheData if set to true, there won't be more than one AJAX request. If set to false, the widget will continuously make AJAX requests. This is useful if the data could vary. If the data doesn't change then is better to set it to true. Defaults to true.

$cacheData if set to true, there won't be more than one AJAX request. If set to false, the widget will continuously make AJAX requests. This is useful if the data could vary. If the data doesn't change then is better to set it to true. Defaults to true.

public string $afterAjaxUpdate
#

a javascript function that will be invoked if an AJAX call occurs.

The function signature is <span class="php-keyword1">function</span>(tr, rowid, data)
  • tr is the newly created TR HTML object that will display the returned server data.
  • rowid the model id of the row.
  • data is the data returned by the server that is already displayed on the row.
Note: This handler is not called for JSONP requests.

Example (add in a call to TbRelationalColumn):

 ...
 'afterAjaxUpdate'=>'js:function(tr,rowid, data){ console.log(rowid); }',
 ...

a javascript function that will be invoked if an AJAX call occurs.

The function signature is <span class="php-keyword1">function</span>(tr, rowid, data)
  • tr is the newly created TR HTML object that will display the returned server data.
  • rowid the model id of the row.
  • data is the data returned by the server that is already displayed on the row.
Note: This handler is not called for JSONP requests.

Example (add in a call to TbRelationalColumn):

 ...
 'afterAjaxUpdate'=>'js:function(tr,rowid, data){ console.log(rowid); }',
 ...
public string $ajaxErrorMessage
#

$ajaxErrorMessage the message that is displayed on the newly created row in case there is an AJAX error.

$ajaxErrorMessage the message that is displayed on the newly created row in case there is an AJAX error.

YiiWheels API documentation generated by ApiGen 2.8.0