cfmgrv4 init...10

This commit is contained in:
최준흠 2026-02-11 10:29:31 +09:00
parent dfa4a17413
commit b9cfd457b5
4 changed files with 17 additions and 13 deletions

View File

@ -66,7 +66,7 @@ class RecordController extends CloudflareController
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
data: ['viewDatas' => $this->getViewDatas()]
['viewDatas' => $this->getViewDatas()]
);
}
protected function create_init(string $action, $fields = []): void

View File

@ -19,7 +19,8 @@ class ZoneController extends CloudflareController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->title = lang("{$this->getService()->getClassPath()}.title");;
$this->title = lang("{$this->getService()->getClassPath()}.title");
;
$this->helper = new ZoneHelper();
}
protected function getService(): ZoneService
@ -71,7 +72,7 @@ class ZoneController extends CloudflareController
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
data: ['viewDatas' => $this->getViewDatas()]
['viewDatas' => $this->getViewDatas()]
);
}
protected function create_init(string $action, $fields = []): void

View File

@ -110,7 +110,9 @@ abstract class CommonController extends BaseController
{
$this->init($action, $fields);
}
protected function create_form_process(): void {}
protected function create_form_process(): void
{
}
final public function create_form(): RedirectResponse|string
{
$this->create_init('create');
@ -120,7 +122,7 @@ abstract class CommonController extends BaseController
{
return view(
$this->view_path . "create",
data: ['viewDatas' => $this->getViewDatas()]
['viewDatas' => $this->getViewDatas()]
);
}
final protected function create_form_procedure(): RedirectResponse|string
@ -202,7 +204,7 @@ abstract class CommonController extends BaseController
{
return view(
$this->view_path . "modify",
data: ['viewDatas' => $this->getViewDatas()]
['viewDatas' => $this->getViewDatas()]
);
}
final protected function modify_form_procedure(mixed $uid): RedirectResponse|string
@ -435,7 +437,7 @@ abstract class CommonController extends BaseController
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
$this->view_path . "view",
data: ['viewDatas' => $this->getViewDatas()]
['viewDatas' => $this->getViewDatas()]
);
}
protected function view_process_failed($message): RedirectResponse|string

View File

@ -17,7 +17,8 @@ class UserController extends CommonController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->title = lang("{$this->getService()->getClassPath()}.title");;
$this->title = lang("{$this->getService()->getClassPath()}.title");
;
$this->helper = new UserHelper();
}
protected function getService(): UserService
@ -49,7 +50,7 @@ class UserController extends CommonController
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view(
$this->view_path . "login",
data: ['viewDatas' => $this->getViewDatas()]
['viewDatas' => $this->getViewDatas()]
);
} catch (\Exception $e) {
log_message("error", $e->getMessage());