cfmgrv4 init...10
This commit is contained in:
parent
fae7082491
commit
a3bd1ab39f
@ -29,15 +29,18 @@ class MyLogHelper extends CommonHelper
|
||||
);
|
||||
break;
|
||||
case 'user_uid':
|
||||
$roles = [];
|
||||
$user_uids = [];
|
||||
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {
|
||||
$roles[] = $viewDatas['field_options'][$field][$key];
|
||||
$user_uids[] = $viewDatas['field_options'][$field][$key];
|
||||
}
|
||||
$value = implode(" , ", $roles);
|
||||
$value = implode(" , ", array: $user_uids);
|
||||
break;
|
||||
case 'content':
|
||||
$value = nl2br($value);
|
||||
break;
|
||||
case 'status':
|
||||
$value = $viewDatas['field_options'][$field][$value];
|
||||
break;
|
||||
default:
|
||||
$value = parent::getFieldView($field, $viewDatas, $extras);
|
||||
break;
|
||||
|
||||
@ -35,7 +35,7 @@ class MyLogModel extends CommonModel
|
||||
}
|
||||
public function getFilterFields(): array
|
||||
{
|
||||
return ['user_uid'];
|
||||
return ['user_uid', 'status'];
|
||||
}
|
||||
public function getBatchJobFields(): array
|
||||
{
|
||||
|
||||
@ -10,7 +10,17 @@ class MyLogService
|
||||
{
|
||||
private static ?MyLogModel $_model = null;
|
||||
private static $_logBuffers = [];
|
||||
private static $_class_name = "MyLog";
|
||||
private static $_class_path = "MyLog";
|
||||
public function __construct() {}
|
||||
final public function getClassName(): string
|
||||
{
|
||||
return self::$_class_name;
|
||||
}
|
||||
final public function getClassPath(): string
|
||||
{
|
||||
return self::$_class_path;
|
||||
}
|
||||
static public function getModel(): MyLogModel
|
||||
{
|
||||
if (self::$_model === null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user