PHP Class Chumper\Datatable\Table

Datei anzeigen Open project: chumper/datatable Class Usage Examples

Protected Properties

Property Type Description
$className The name of the class the table will have later
$footerMode The footer's display mode
$idName The name of the id the table will have later
$script_view The view used to render the javascript
$table_view The view used to render the table

Public Methods

Method Description
__construct ( )
addColumn ( )
countColumns ( ) : integer Count the number of columns in the datatable.
getCallbacks ( ) : array
getClass ( ) : String
getCustomValues ( ) : array
getData ( ) : array
getId ( ) : String
getOptions ( ) : array
noScript ( ) Instructs the table not to echo the javascript
removeOption ( string $key ) Remove an option item from the options array
render ( null $view = null, array $additional_template_variables = null ) : mixed
script ( null $view = null ) : mixed
setAliasMapping ( boolean $value = true ) Advise the Datatable to return the data mapped with the column name.
setCallbacks ( )
setClass ( $class ) Set the name of the class that will be used by the datatable.
setCustomValues ( )
setData ( array $data )
setId ( string $id = '' )
setOptions ( ) Set a single option or an array of options for the jquery call
setOrder ( $order = [] )
setUrl ( $url )
showFooter ( $value = 'columns' ) Set the footer display mode.

Private Methods

Method Description
createMapping ( ) : array

Method Details

__construct() public method

public __construct ( )

addColumn() public method

public addColumn ( )

countColumns() public method

Count the number of columns in the datatable.
public countColumns ( ) : integer
return integer

getCallbacks() public method

public getCallbacks ( ) : array
return array

getClass() public method

public getClass ( ) : String
return String

getCustomValues() public method

public getCustomValues ( ) : array
return array

getData() public method

public getData ( ) : array
return array

getId() public method

public getId ( ) : String
return String

getOptions() public method

public getOptions ( ) : array
return array

noScript() public method

Instructs the table not to echo the javascript
public noScript ( )

removeOption() public method

Remove an option item from the options array
public removeOption ( string $key )
$key string the name of the key to remove from the options.

render() public method

public render ( null $view = null, array $additional_template_variables = null ) : mixed
$view null
$additional_template_variables array
return mixed

script() public method

public script ( null $view = null ) : mixed
$view null
return mixed

setAliasMapping() public method

Advise the Datatable to return the data mapped with the column name.
public setAliasMapping ( boolean $value = true )
$value boolean explicitly set if the table should be aliased or not

setCallbacks() public method

public setCallbacks ( )

setClass() public method

Set the name of the class that will be used by the datatable.
public setClass ( $class )
$class the name of the class

setCustomValues() public method

public setCustomValues ( )

setData() public method

public setData ( array $data )
$data array

setId() public method

public setId ( string $id = '' )
$id string

setOptions() public method

Set a single option or an array of options for the jquery call
public setOptions ( )

setOrder() public method

public setOrder ( $order = [] )

setUrl() public method

public setUrl ( $url )
$url

showFooter() public method

Set the footer display mode.
public showFooter ( $value = 'columns' )
$value the one of next values: 'hidden', 'columns', 'empty'

Property Details

$className protected_oe property

The name of the class the table will have later
protected $className

$footerMode protected_oe property

The footer's display mode
protected $footerMode

$idName protected_oe property

The name of the id the table will have later
protected $idName

$script_view protected_oe property

The view used to render the javascript
protected $script_view

$table_view protected_oe property

The view used to render the table
protected $table_view