service === null) { $this->service = service('localauth'); } $this->addActionPaths(self::PATH); } protected function getFormRule(string $action, string $field, string $rule): array { switch ($field) { case 'role': $field = "{$field}.*"; break; } return parent::getFormRule($action, $field, $rule); } //Index,FieldForm관련. protected function create_process(string $action, array $viewDatas): string|RedirectResponse { $dto = new UserDTO($this->request->getPost()); $this->doValidation($action); $entity = $this->service->create($dto); return redirect() ->route('admin/user/view', [$entity->getPK()]) ->with('message', "{$entity->getTitle()} 계정이 등록되었습니다."); } }