dbmsv4 init...1

This commit is contained in:
최준흠 2025-11-24 11:11:53 +09:00
parent a21ad6be09
commit d71a88c584
38 changed files with 111 additions and 73 deletions

View File

@ -95,8 +95,6 @@ abstract class AbstractCRUDController extends AbstractWebController
final public function modify_form($uid): string|RedirectResponse
{
try {
$action = __FUNCTION__;
$this->action_init_process($action);
$entity = $this->modify_form_process($uid);
// 💡 동적으로 가져온 Entity 클래스 이름으로 instanceof 검사
$entityClass = $this->getEntityClass();
@ -104,6 +102,8 @@ abstract class AbstractCRUDController extends AbstractWebController
throw new RuntimeException(__METHOD__ . "에서 오류발생:Return Type은 {$entityClass}만 가능");
}
$this->addViewDatas('entity', $entity);
$action = __FUNCTION__;
$this->action_init_process($action, $entity);
return $this->modify_form_result_process($action);
} catch (\Exception $e) {
return $this->action_redirect_process('error', "{$this->getTitle()}에서 {$uid} 수정폼 오류:" . $e->getMessage());

View File

@ -76,7 +76,7 @@ abstract class AbstractWebController extends Controller
/**
* 모든 액션 실행 공통 초기화 작업
*/
protected function action_init_process(string $action): void
protected function action_init_process(string $action, ?object $entity = null): void
{
$this->addViewDatas('action', $action);
$this->addViewDatas('authContext', $this->getAuthContext());

View File

@ -18,10 +18,10 @@ abstract class AdminController extends CommonController
{
return 'admin';
}
protected function action_init_process(string $action): void
protected function action_init_process(string $action, ?object $entity = null): void
{
$this->service->action_init_process($action);
parent::action_init_process($action);
$this->service->action_init_process($action, $entity);
parent::action_init_process($action, $entity);
$this->addViewDatas('layout', $this->getLayout());
$this->addViewDatas('title', $this->getTitle());
$this->addViewDatas('helper', $this->service->getHelper());

View File

@ -23,4 +23,15 @@ class ServiceController extends CustomerController
}
//기본 함수 작업
//Custom 추가 함수
public function create_form_process(array $formDatas = []): array
{
$formDatas['location'] = 'chiba';
$formDatas['rack'] = '100000';
$formDatas['line'] = '300000';
$formDatas['type'] = 'normal';
$formDatas['billing_at'] = date("Y-m-d");
$formDatas['start_at'] = date("Y-m-d");
$formDatas['status'] = STATUS['AVAILABLE'];
return $formDatas;
}
}

View File

@ -23,4 +23,9 @@ class ServerController extends EquipmentController
}
//기본 함수 작업
//Custom 추가 함수
public function create_form_process(array $formDatas = []): array
{
$formDatas['code'] = sprintf("%d%dXX-M%d", date("y"), ceil((int)date("m") / 3), $this->service->getNextPK());
return $formDatas;
}
}

View File

@ -16,13 +16,14 @@ class Collector extends BaseController
{
parent::initController($request, $response, $logger);
if ($this->service === null) {
$action = 'create';
$this->service = service('collectorservice');
$fields = ['trafficinfo_uid', 'in', 'out', 'raw_in', 'raw_out'];
$filters = ['trafficinfo_uid'];
$this->service->getFormService()->setFormFields($fields);
$this->service->getFormService()->setFormRules('create', $fields);
$this->service->getFormService()->setFormRules($action, $fields);
$this->service->getFormService()->setFormFilters($filters);
$this->service->getFormService()->setFormOptions($filters);
$this->service->getFormService()->setFormOptions($action, $filters);
$this->service->getFormService()->setBatchjobFilters($filters);
}
}

View File

@ -61,12 +61,13 @@ abstract class CommonController extends AbstractCRUDController
final public function batchjob(): string|RedirectResponse
{
try {
$action = __FUNCTION__;
// 사전작업 및 데이터 추출 초기화
list($uids, $selectedFields, $formDatas) = $this->batchjob_pre_process();
$this->service->getFormService()->setFormFields($selectedFields);
$this->service->getFormService()->setFormRules(__FUNCTION__, $selectedFields);
$this->service->getFormService()->setFormRules($action, $selectedFields);
$this->service->getFormService()->setFormFilters($selectedFields);
$this->service->getFormService()->setFormOptions($selectedFields);
$this->service->getFormService()->setFormOptions($action, $selectedFields);
$entities = [];
$errors = [];
foreach ($uids as $uid) {

View File

@ -44,7 +44,7 @@ class BoardForm extends CommonForm
}
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
@ -56,7 +56,7 @@ class BoardForm extends CommonForm
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -57,10 +57,10 @@ abstract class CommonForm
}
return array_intersect_key($this->_formRules, array_flip($fields));
}
final public function setFormOptions(array $fields, $formOptions = []): void
final public function setFormOptions(string $action, array $fields, ?object $entity = null, $formOptions = []): void
{
foreach ($fields as $field) {
$formOptions[$field] = $formOptions[$field] ?? $this->getFormOption($field);
$formOptions[$field] = $formOptions[$field] ?? $this->getFormOption($action, $field, $entity);
}
$this->_formOptions = $formOptions;
}
@ -183,19 +183,38 @@ abstract class CommonForm
}
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
protected function getFormOption_process($service, string $action, string $field, ?object $entity = null): array
{
$entities = [];
switch ($action) {
case 'create_form':
$entities = $service->getEntities(['status' => STATUS['AVAILABLE']]);
break;
case 'modify_form':
$where = sprintf("status = '%s' OR uid=%s", STATUS['AVAILABLE'], $entity->$field);
echo $where;
$entities = $service->getEntities([$where => null]);
break;
default:
$entities = $service->getEntities();
break;
}
return $entities;
}
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
case 'user_uid':
foreach (service('userservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) {
foreach ($this->getFormOption_process(service('userservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
}
$options['options'] = $tempOptions;
break;
case 'clientinfo_uid':
foreach (service('customer_clientservice')->getEntities(['status' => STATUS['AVAILABLE']]) as $entity) {
foreach ($this->getFormOption_process(service('customer_clientservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
}

View File

@ -46,19 +46,19 @@ class ServiceForm extends CustomerForm
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
case 'serverinfo_uid':
foreach (service('equipment_serverservice')->getEntities() as $entity) {
foreach ($this->getFormOption_process(service('equipment_serverservice'), $action, $field, $entity) as $entity) {
$tempOptions[$entity->getPK()] = $entity->getTitle();
// $options['attributes'][$entity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_ROLE'], $entity->getRole())];
}
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -45,7 +45,7 @@ class ServerForm extends EquipmentForm
}
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
@ -59,7 +59,7 @@ class ServerForm extends EquipmentForm
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -42,7 +42,7 @@ class ServerPartForm extends EquipmentForm
{
return service('part_' . strtolower($type) . 'service');
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
@ -76,7 +76,7 @@ class ServerPartForm extends EquipmentForm
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -27,7 +27,7 @@ class IPForm extends PartForm
}
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
@ -47,7 +47,7 @@ class IPForm extends PartForm
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -35,7 +35,7 @@ abstract class PartForm extends CommonForm
}
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
@ -54,7 +54,7 @@ abstract class PartForm extends CommonForm
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -41,7 +41,7 @@ class PaymentForm extends CommonForm
return $rule;
}
public function getFormOption(string $field, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
public function getFormOption(string $action, string $field, ?object $entity = null, array $options = ['options' => [], 'extras' => [], 'atttributes' => []]): array
{
$tempOptions = ['' => lang("{$this->getAttribute('class_path')}.label.{$field}") . " 선택"];
switch ($field) {
@ -53,7 +53,7 @@ class PaymentForm extends CommonForm
$options['options'] = $tempOptions;
break;
default:
$options = parent::getFormOption($field, $options);
$options = parent::getFormOption($action, $field, $entity, $options);
break;
}
return $options;

View File

@ -12,12 +12,13 @@ class ServiceHelper extends CustomerHelper
{
switch ($field) {
case 'site':
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
$extras['onChange'] = "$('select[name=\'clientinfo_uid\']').select2('open')";
$form = form_dropdown($field, $value, $viewDatas, $extras);
$form = form_dropdown($field, $viewDatas['formOptions'][$field]['options'], $value, $extras);
break;
case 'serverinfo_uid':
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
$form = form_dropdown($field, $value, $viewDatas, $extras);
$form = form_dropdown($field, $viewDatas['formOptions'][$field]['options'], $value, $extras);
break;
case 'amount':
$form = form_input($field, 0, ["readonly" => "readonly", ...$extras]);

View File

@ -45,7 +45,7 @@ class GoogleService extends AuthService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters);
$this->getFormService()->setBatchjobFilters($filters);
}
protected function getEntity_process(mixed $entity): UserEntity

View File

@ -45,7 +45,7 @@ class LocalService extends AuthService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters);
$this->getFormService()->setBatchjobFilters($filters);
}
protected function getEntity_process(mixed $entity): UserEntity

View File

@ -53,7 +53,7 @@ class BoardService extends CommonService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
'category',
@ -111,7 +111,7 @@ class BoardService extends CommonService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -30,7 +30,7 @@ abstract class CommonService
{
return $isArray ? $this->_classPaths : implode($delimeter, $this->_classPaths);
}
abstract public function action_init_process(string $action);
abstract public function action_init_process(string $action, ?object $entity = null): void;
/**
* 단일 엔티티를 조회합니다.
* @return CommonEntity|null CommonEntity 인스턴스 또는 찾지 못했을 경우 null

View File

@ -54,7 +54,7 @@ class AccountService extends CustomerService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"clientinfo_uid",
@ -92,7 +92,7 @@ class AccountService extends CustomerService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class ClientService extends CustomerService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
'site',
@ -101,7 +101,7 @@ class ClientService extends CustomerService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class CouponService extends CustomerService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"clientinfo_uid",
@ -86,7 +86,7 @@ class CouponService extends CustomerService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class PointService extends CustomerService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"clientinfo_uid",
@ -86,7 +86,7 @@ class PointService extends CustomerService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -56,7 +56,7 @@ class ServiceService extends CustomerService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"site",
@ -116,7 +116,7 @@ class ServiceService extends CustomerService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class LineService extends EquipmentService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"type",
@ -87,7 +87,7 @@ class LineService extends EquipmentService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -56,7 +56,7 @@ class ServerPartService extends EquipmentService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"serverinfo_uid",
@ -96,7 +96,7 @@ class ServerPartService extends EquipmentService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class ServerService extends EquipmentService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"code",
@ -94,7 +94,7 @@ class ServerService extends EquipmentService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -42,7 +42,7 @@ class MylogService extends CommonService implements PipelineStepInterface
}
return $this->_form;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = ['title', 'content'];
$filters = [];
@ -65,7 +65,7 @@ class MylogService extends CommonService implements PipelineStepInterface
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class CPUService extends PartService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"title",
@ -84,7 +84,7 @@ class CPUService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class CSService extends PartService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"type",
@ -111,7 +111,7 @@ class CSService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class DISKService extends PartService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"title",
@ -85,7 +85,7 @@ class DISKService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class IPService extends PartService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"lineinfo_uid",
@ -102,7 +102,7 @@ class IPService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class RAMService extends PartService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"title",
@ -84,7 +84,7 @@ class RAMService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -40,7 +40,7 @@ class SOFTWAREService extends PartService
}
return $this->_form;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"title",
@ -70,7 +70,7 @@ class SOFTWAREService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class SWITCHService extends PartService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"code",
@ -103,7 +103,7 @@ class SWITCHService extends PartService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class PaymentService extends CommonService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
"serviceinfo_uid",
@ -122,7 +122,7 @@ class PaymentService extends CommonService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}

View File

@ -54,7 +54,7 @@ class UserService extends CommonService
}
return $this->_helper;
}
public function action_init_process(string $action): void
public function action_init_process(string $action, ?object $entity = null): void
{
$fields = [
'id',
@ -87,7 +87,7 @@ class UserService extends CommonService
$this->getFormService()->setFormFields($fields);
$this->getFormService()->setFormRules($action, $fields);
$this->getFormService()->setFormFilters($filters);
$this->getFormService()->setFormOptions($filters);
$this->getFormService()->setFormOptions($action, $filters, $entity);
$this->getFormService()->setIndexFilters($indexFilter);
$this->getFormService()->setBatchjobFilters($batchjobFilters);
}