columns([
'status' => function ($ceil) {
return getStatusLabel()[$ceil];
},
'email' => function ($ceil) {
return "$ceil";
},
'description' => function ($ceil) {
return "$ceil";
}
]);
//$table->setBeforePrintCell(function ($key, $data) {
// return $key == "email" ? "$data" : $data;
//});
$table->afterPrint(function ($meta) {
return "
After Print
";
});
$table->addColumn("Колонка 33", "k33", function ($id) {
return "my ID: " . $id;
});
$table->addColumn("Колонка 34", "k34", function ($id) {
return "some34";
});
$table->create();
$table->render();
function getStatusLabel(): array
{
return [
0 => "На модерации",
1 => "Активный",
2 => "Модератор",
99 => "Удален",
];
}