["class" => "table table-bordered", "border" => "2"], 'baseUrl' => "/admin/user", ]); $table = new ViewJsonTable($dataProvider->getJson()); $table->beforeTable(function () use ($user) { $btn = PrimaryBtn::create("Список", "/admin/user")->fetch(); $btn .= SuccessBtn::create("Редактировать", "/admin/user/update/" . $user->id)->fetch(); $btn .= DangerBtn::create("Удалить", "/admin/user/delete/" . $user->id)->fetch(); return $btn; }); $table->create(); $table->render();