pid]) ? $departmentArray[$model->pid] : ""; }; } public static function checkbox() { return function($model) { if ($model->id == 1) return ""; return ""; }; } public static function rows() { return function($model, $index, $widget, $grid) { return [ "onclick" => "common.form(this, 'department');", "style" => "cursor: pointer;", "data" => [ "href" => Url::to(["update", "id" => $model->id]) ] ]; }; } }