init Area full CRUD
This commit is contained in:
@@ -73,7 +73,7 @@ class CommonGrid {
|
||||
public static function rows($type) {
|
||||
return function($model, $index, $widget, $grid) use ($type) {
|
||||
return [
|
||||
"onclick" => "common.form(this, '{$type}');",
|
||||
"ondblclick" => "common.form(this, '{$type}');",
|
||||
"style" => "cursor: pointer;",
|
||||
"data" => [
|
||||
"href" => Url::to(["update", "id" => $model->id])
|
||||
@@ -82,4 +82,10 @@ class CommonGrid {
|
||||
};
|
||||
}
|
||||
|
||||
public static function pid($array) {
|
||||
return function($model) use ($array) {
|
||||
return isset($array[$model->pid]) ? $array[$model->pid] : "";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user