cfmgrv4 init...10

This commit is contained in:
최준흠 2025-03-13 18:01:07 +09:00
parent fae7082491
commit a3bd1ab39f
3 changed files with 17 additions and 4 deletions

View File

@ -29,15 +29,18 @@ class MyLogHelper extends CommonHelper
); );
break; break;
case 'user_uid': case 'user_uid':
$roles = []; $user_uids = [];
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) { 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; break;
case 'content': case 'content':
$value = nl2br($value); $value = nl2br($value);
break; break;
case 'status':
$value = $viewDatas['field_options'][$field][$value];
break;
default: default:
$value = parent::getFieldView($field, $viewDatas, $extras); $value = parent::getFieldView($field, $viewDatas, $extras);
break; break;

View File

@ -35,7 +35,7 @@ class MyLogModel extends CommonModel
} }
public function getFilterFields(): array public function getFilterFields(): array
{ {
return ['user_uid']; return ['user_uid', 'status'];
} }
public function getBatchJobFields(): array public function getBatchJobFields(): array
{ {

View File

@ -10,7 +10,17 @@ class MyLogService
{ {
private static ?MyLogModel $_model = null; private static ?MyLogModel $_model = null;
private static $_logBuffers = []; private static $_logBuffers = [];
private static $_class_name = "MyLog";
private static $_class_path = "MyLog";
public function __construct() {} 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 static public function getModel(): MyLogModel
{ {
if (self::$_model === null) { if (self::$_model === null) {