columns([ 'preview' => function ($data) { return ""; } ]); $table->addAction(function ($row, $url){ $path = $row['path']; $active_admin_theme = \kernel\modules\option\service\OptionService::getItem('active_admin_theme'); $btn = ActionButtonWidget::create([ 'btn_type' => "primary", 'label' => "Активировать", 'url' => "$url/activate/?p=$path", ])->run(); if ($path === $active_admin_theme){ $btn = "Активна"; } return $btn; }); $table->create(); $table->render();