app->app_name;
};
}
public static function getLayout() {
return "{items}
";
}
public static function actionTemplate() {
return "{update} {delete}";
}
public static function time() {
return function($model) {
return date("H:i:s d/m/Y", $model->time);
};
}
public static function birthday() {
return function($model) {
return date("d/m/Y", $model->birthday);
};
}
public static function image() {
return function($model) {
$images = json_decode($model->image, true);
$return = [];
foreach ($images as $key => $value) {
$removeBtn = Html::button("", [
"class" => "btn btn-danger btn-xs",
"style" => "position:absolute;top:0;right:0;visibility: hidden;",
"onclick" => "_deleteFeature(this);",
"data-img" => $value['url'],
"data-id" => $model->id,
"data-href" => Url::to(["/list-management/delete-feature"])
]);
$return[] = "" . Html::img("/data/uploads/face/" . $value['url'], [
"class" => "img-thumbnail",
"style" => "width: 100px;height:100px;"
]) . $removeBtn . "
";
}
return implode(" ", $return);
};
}
public static function type($typeArray) {
return function($model) use ($typeArray) {
return $typeArray[$model->type];
};
}
public static function rows() {
return function($model, $index, $widget, $grid) {
return [
"ondblclick" => "_menu(this);",
"style" => "cursor: pointer;",
"data" => [
"id" => $model->id
]
];
};
}
}