I am trying to use the ZF2 Album tutorial and set up zfTable module, which is availible here:
https://github.com/dudapiotr/ZfTable
I have followed the install instructions on this site, and I feel that is fine. I do however feel there is a lack of detail on the implementation part for someone new to zendframework 2.
Could anyone explain how to take a basic example and implement the result into the table? I think the Album example is perfect as many people use this as a starting block.
http://dudapiotr.eu/table/base
The only information this site gives in reference to get this working after the basic install instructions is a class.
Some details of where to put this class, how to call it etc would be great.
I think this would be a great use to many others who seem to have this problem (but no solution or tutorial seems to be out there hehe)
class Base extends AbstractTable
{
protected $config = array(
'name' => 'Base table',
'showPagination' => true,
'showQuickSearch' => false,
'showItemPerPage' => true,
'itemCountPerPage' => 20,
'showColumnFilters' => false,
'showExportToCSV ' => false,
'valuesOfItemPerPage' => array(5, 10, 20, 50 , 100 , 200),
'rowAction' => ''
);
//Definition of headers
protected $headers = array(
'idcustomer' => array('title' => 'Id', 'width' => '50') ,
'name' => array('title' => 'Name' ),
'surname' => array('title' => 'Surname' ),
'street' => array('title' => 'Street'),
'city' => array('title' => 'City' ),
'active' => array('title' => 'Active' , 'width' => 100 ),
);
public function init()
{
}
protected function initFilters(\Zend\Db\Sql\Select $query)
{
}
}
Thanks,