PHP Class Newscoop\Controller\Action\Helper\Datatable\ADatatable

Inheritance: extends Zend_Controller_Action_Helper_Abstrac\Zend_Controller_Action_Helper_Abstract
Show file Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$_adapter Newscoop\Controller\Action\Helper\Datatable\Adapter\AAdapter The data adapter
$_cols array Columns
$_colsIndex array Columns' index
$_isDispatched
$_options array Options
$_outputObject object Output object for processed data
$_params Paramenters for the data fetching Get them from the request object for example
$_rowHandler function Row handler, called for each row in datatable

Public Methods

Method Description
dispatch ( $p_params = null, $p_cols = null, $p_options = null ) should implement a switching method for data and metadata fetching
dispatchData ( array $p_params = null, array $p_cols = null ) Get data and set the out object
dispatchMedatata ( array $p_cols = null, array $p_options = null ) set output metadata
getAdapter ( ) : Adapter Get the data adapter
getOptions ( ) : array Get options
getOutputObject ( ) : object Get output object
init ( )
setAdapter ( AAdapter $p_adapter ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set the data adapter
setCols ( $p_cols ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set columns
setOption ( string $p_key, $p_value ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set option
setOptions ( array $p_options ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set multiple options
setOutputObject ( object &$p_object ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set output object, for example the view object.
setParams ( $p_params ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set params
setRowHandler ( function $p_func ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable Set row handler

Method Details

dispatch() abstract public method

should implement a switching method for data and metadata fetching
abstract public dispatch ( $p_params = null, $p_cols = null, $p_options = null )

dispatchData() public method

Get data and set the out object
public dispatchData ( array $p_params = null, array $p_cols = null )
$p_params array
$p_cols array

dispatchMedatata() public method

set output metadata
public dispatchMedatata ( array $p_cols = null, array $p_options = null )
$p_cols array
$p_options array

getAdapter() public method

Get the data adapter
public getAdapter ( ) : Adapter
return Adapter $p_adapter

getOptions() public method

Get options
public getOptions ( ) : array
return array

getOutputObject() public method

Get output object
public getOutputObject ( ) : object
return object $p_object

init() public method

public init ( )

setAdapter() public method

Set the data adapter
public setAdapter ( AAdapter $p_adapter ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
$p_adapter Newscoop\Controller\Action\Helper\Datatable\Adapter\AAdapter
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

setCols() public method

Set columns
public setCols ( $p_cols ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

setOption() public method

Set option
public setOption ( string $p_key, $p_value ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
$p_key string
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

setOptions() public method

Set multiple options
public setOptions ( array $p_options ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
$p_options array
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

setOutputObject() public method

Set output object, for example the view object.
public setOutputObject ( object &$p_object ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
$p_object object
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

setParams() public method

Set params
public setParams ( $p_params ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

setRowHandler() public method

Set row handler
public setRowHandler ( function $p_func ) : Newscoop\Controller\Action\Helper\Datatable\ADatatable
$p_func function
return Newscoop\Controller\Action\Helper\Datatable\ADatatable

Property Details

$_adapter protected property

The data adapter
protected AAdapter,Newscoop\Controller\Action\Helper\Datatable\Adapter $_adapter
return Newscoop\Controller\Action\Helper\Datatable\Adapter\AAdapter

$_cols protected property

Columns
protected array $_cols
return array

$_colsIndex protected property

Columns' index
protected array $_colsIndex
return array

$_isDispatched protected property

protected $_isDispatched

$_options protected property

Options
protected array $_options
return array

$_outputObject protected property

Output object for processed data
protected object $_outputObject
return object

$_params protected property

Paramenters for the data fetching Get them from the request object for example
protected $_params

$_rowHandler protected property

Row handler, called for each row in datatable
protected function $_rowHandler
return function