update Device full CRUD
This commit is contained in:
27
helpers/DeviceGrid.php
Normal file
27
helpers/DeviceGrid.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\helpers;
|
||||
|
||||
class DeviceGrid extends CommonGrid {
|
||||
|
||||
public static function status($array) {
|
||||
return function($model) use ($array) {
|
||||
if ($model->status)
|
||||
return "<i class='fa fa-check text-green'></i>";
|
||||
return "<i class='fa fa-remove text-red'></i>";
|
||||
};
|
||||
}
|
||||
|
||||
public static function type($array) {
|
||||
return function($model) use ($array) {
|
||||
return isset($array[$model->type]) ? $array[$model->type] : "";
|
||||
};
|
||||
}
|
||||
|
||||
public static function area($array) {
|
||||
return function($model) use ($array) {
|
||||
return isset($array[$model->area_id]) ? $array[$model->area_id] : "";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user