MicroFrameWork/kernel/views/module/view.php

28 lines
711 B
PHP
Raw Normal View History

2024-09-13 13:54:58 +03:00
<?php
/**
* @var array $data
*/
2024-11-20 12:45:02 +03:00
use Itguild\Tables\ViewJsonTable;
use kernel\widgets\IconBtn\IconBtnListWidget;
2024-09-13 13:54:58 +03:00
$table_info = [
"meta" => [
"rows" => [
"name" => "Название",
"author" => "Автор",
"version" => "Версия",
"description" => "Описание"
],
"params" => ["class" => "table table-bordered"],
"baseUrl" => "/admin/module",
],
"data" => $data
];
2024-11-20 12:45:02 +03:00
$table = new ViewJsonTable(json_encode($table_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
2024-09-13 13:54:58 +03:00
$table->beforePrint(function () {
2024-11-20 12:45:02 +03:00
return IconBtnListWidget::create(['url' => '/admin'])->run();
2024-09-13 13:54:58 +03:00
});
$table->create();
$table->render();