addColumn('checkbox', function ($model) { return ''; }); } foreach ($columns as $column) { // set visible to true by default if (count($column) == 2) { $column[] = true; } list($field, $value, $visible) = $column; if ($visible) { $table->addColumn($field, $value); $orderColumns[] = $field; } } if ($actions) { $this->createDropdown($entityType, $table, $actions); } return $table->orderColumns($orderColumns)->make(); } private function createDropdown($entityType, $table, $actions) { $table->addColumn('dropdown', function ($model) use ($entityType, $actions) { $str = '