Class QHtmlTableCallableColumn
A type of column that lets you use a PHP 'callable'. However, you CANNOT send a PHP closure to this,
since closures are not serializable. You CAN do things like array($this, 'method'), or 'Class::StaticMethod'.
-
QBaseClass
-
QAbstractHtmlTableColumn
-
QAbstractHtmlTableDataColumn
-
QHtmlTableCallableColumn
Methods summary
public
|
#
__construct( string $strName, callable $objCallable, mixed $mixParams = null )
Parameters
- $strName
- name of the column
- $objCallable
a callable object. It should take a single argument, the item
of the array. Do NOT pass an actual Closure object, as they are not serializable. However,
you can pass a callable, like array($this, 'method'), or an object that has the __invoke method defined,
as long as its serializable. You can also pass static methods as a string, as in "Class::method"
- $mixParams
extra parameters to pass to the closure callback.
will be called with the row of the DataSource as that single argument.
Throws
InvalidArgumentException
Overrides
|
public
|
#
FetchCellObject( mixed $item )
Return the value of the cell. FetchCellValue will process this more if needed.
Default returns an entire data row and relies on FetchCellValue to extract the needed data.
Return the value of the cell. FetchCellValue will process this more if needed.
Default returns an entire data row and relies on FetchCellValue to extract the needed data.
Parameters
|
public
|
#
Sleep( )
Fix up possible embedded reference to the form.
Fix up possible embedded reference to the form.
Overrides
|
public
|
#
Wakeup( QForm $objForm )
Restore serialized references.
Restore serialized references.
Parameters
Overrides
|
public
boolean|callable|integer|mixed|QHtmlTableBase |string
|
#
__get( string $strName )
PHP magic method
Parameters
Returns
Throws
Overrides
|
public
mixed|
|
#
__set( string $strName, string $mixValue )
PHP magic method
Parameters
Returns
mixed|
Throws
Overrides
|
Methods inherited from QAbstractHtmlTableColumn
FetchHeaderCellValue(),
GetCellClass(),
GetCellId(),
GetCellParams(),
GetCellStyle(),
GetColParams(),
GetHeaderCellParams(),
ParsePostData(),
RenderCell(),
RenderColTag(),
RenderHeaderCell()
|
Properties summary
protected
callable
|
$objCallable
|
|
protected
array
|
$mixParams
extra parameters passed to closure
extra parameters passed to closure
|
|
Properties inherited from QAbstractHtmlTableColumn
$blnHtmlEntities,
$blnRenderAsHeader,
$blnVisible,
$cellParamsCallback,
$intSpan,
$objCellStyler,
$objColStyler,
$objHeaderCellStyler,
$objParentTable,
$strCssClass,
$strHeaderCssClass,
$strId,
$strName
|
Magic properties summary
public
integer|string
|
$Index
the index or key to use when accessing the arrays in the DataSource array
|
Magic properties inherited from QAbstractHtmlTableColumn
$CellParamsCallback,
$CellStyler,
$ColStyler,
$CssClass,
$HeaderCellStyler,
$HeaderCssClass,
$HtmlEntities,
$Id,
$Name,
$ParentTable,
$RenderAsHeader,
$Span,
$Visible,
$_ParentTable
|