["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/slider", ])); $table->beforePrint(function () use ($slider) { $btn = PrimaryBtn::create("Список", "/admin/slider")->fetch(); $btn .= SuccessBtn::create("Редактировать", "/admin/slider/update/" . $slider->id)->fetch(); $btn .= DangerBtn::create("Удалить", "/admin/slider/delete/" . $slider->id)->fetch(); return $btn; }); $table->rows([ 'status' => (function ($data) { return \app\modules\slider\models\Slider::getStatus()[$data]; }) ]); $table->create(); $table->render();