32 lines
752 B
PHP
32 lines
752 B
PHP
<?php
|
|
|
|
namespace app\helpers;
|
|
|
|
class StaffGrid extends CommonGrid {
|
|
|
|
public static function department($array) {
|
|
return function($model) use ($array) {
|
|
return isset($array[$model->department_id]) ? $array[$model->department_id] : "";
|
|
};
|
|
}
|
|
|
|
public static function gender($array) {
|
|
return function($model) use ($array) {
|
|
return isset($array[$model->gender]) ? $array[$model->gender] : "";
|
|
};
|
|
}
|
|
|
|
public static function birthday() {
|
|
return function($model) {
|
|
return date("d/m/Y", $model->birthday);
|
|
};
|
|
}
|
|
|
|
public static function dateIn() {
|
|
return function($model) {
|
|
return date("d/m/Y", $model->date_in);
|
|
};
|
|
}
|
|
|
|
}
|