protected function createComponentDataGrid()
{
return new Multiplier(function ($month) {
$grid = new Datagrid();
$grid->addColumn('l_year', 'Rok');
$grid->addColumn('l_month', 'Měsíc');
$grid->addColumn('l_description', 'Popis');
$grid->addColumn('worked_days', 'Dny');
$grid->addColumn('total_worked_hours', 'Hodiny');
$grid->setDataSourceCallback(function ($filter, $order) use($month) {
return $this->listings[$month];
});
$grid->addCellsTemplate(__DIR__ . '/templates/grid/grid.latte');
return $grid;
});
}