I am porting an application from v2.0 Community to v3.2.6 Enterprise
callbackColumn() worked perfectly in v2.0 but in v3.2.6 it doesn’t seem to do anything.
Below is my test method
public function test()
{
$crud = $this->_getGroceryCrudEnterprise();
$crud->setTable('children');
$crud->columns(['Child_first_name', 'Age']);
$crud->fieldType('Age', 'virtual');
$crud->callbackColumn('Age', function ($value, $row) {
return "Hello";
});
$output = $crud->render();
return $this->_example_output($output);
}
I would expect a table with 2 columns where the ‘Age’ column has ‘Hello’ in every row.
What I get is an empty column. I checked the HTML and the ‘Age’ column is definitely empty.
I added the $crud->fieldType(‘Age’, ‘virtual’); line because gc complained ‘Age’ wasn’t in the database.
What am I doing wrong?
