cfmgrv4 init...10
This commit is contained in:
parent
dfa4a17413
commit
b9cfd457b5
@ -60,13 +60,13 @@ class RecordController extends CloudflareController
|
|||||||
//생성
|
//생성
|
||||||
protected function create_process_result($message): RedirectResponse|string
|
protected function create_process_result($message): RedirectResponse|string
|
||||||
{
|
{
|
||||||
MyLogService::save($this->getService(), __FUNCTION__, $this->myauth, $message, DEFAULTS['STATUS']);
|
MyLogService::save($this->getService(), __FUNCTION__, $this->myauth, $message, DEFAULTS['STATUS']);
|
||||||
$this->init(__FUNCTION__);
|
$this->init(__FUNCTION__);
|
||||||
helper(['form']);
|
helper(['form']);
|
||||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
return view(
|
return view(
|
||||||
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
|
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
protected function create_init(string $action, $fields = []): void
|
protected function create_init(string $action, $fields = []): void
|
||||||
|
|||||||
@ -19,7 +19,8 @@ class ZoneController extends CloudflareController
|
|||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->title = lang("{$this->getService()->getClassPath()}.title");;
|
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||||
|
;
|
||||||
$this->helper = new ZoneHelper();
|
$this->helper = new ZoneHelper();
|
||||||
}
|
}
|
||||||
protected function getService(): ZoneService
|
protected function getService(): ZoneService
|
||||||
@ -65,13 +66,13 @@ class ZoneController extends CloudflareController
|
|||||||
//생성
|
//생성
|
||||||
protected function create_process_result($message): RedirectResponse|string
|
protected function create_process_result($message): RedirectResponse|string
|
||||||
{
|
{
|
||||||
MyLogService::save($this->getService(), __FUNCTION__, $this->myauth, $message, DEFAULTS['STATUS']);
|
MyLogService::save($this->getService(), __FUNCTION__, $this->myauth, $message, DEFAULTS['STATUS']);
|
||||||
$this->init(__FUNCTION__);
|
$this->init(__FUNCTION__);
|
||||||
helper(['form']);
|
helper(['form']);
|
||||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
return view(
|
return view(
|
||||||
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
|
strtolower($this->view_path . $this->getService()->getClassPath() . "/create_result"),
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
protected function create_init(string $action, $fields = []): void
|
protected function create_init(string $action, $fields = []): void
|
||||||
|
|||||||
@ -110,7 +110,9 @@ abstract class CommonController extends BaseController
|
|||||||
{
|
{
|
||||||
$this->init($action, $fields);
|
$this->init($action, $fields);
|
||||||
}
|
}
|
||||||
protected function create_form_process(): void {}
|
protected function create_form_process(): void
|
||||||
|
{
|
||||||
|
}
|
||||||
final public function create_form(): RedirectResponse|string
|
final public function create_form(): RedirectResponse|string
|
||||||
{
|
{
|
||||||
$this->create_init('create');
|
$this->create_init('create');
|
||||||
@ -120,7 +122,7 @@ abstract class CommonController extends BaseController
|
|||||||
{
|
{
|
||||||
return view(
|
return view(
|
||||||
$this->view_path . "create",
|
$this->view_path . "create",
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final protected function create_form_procedure(): RedirectResponse|string
|
final protected function create_form_procedure(): RedirectResponse|string
|
||||||
@ -202,7 +204,7 @@ abstract class CommonController extends BaseController
|
|||||||
{
|
{
|
||||||
return view(
|
return view(
|
||||||
$this->view_path . "modify",
|
$this->view_path . "modify",
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final protected function modify_form_procedure(mixed $uid): RedirectResponse|string
|
final protected function modify_form_procedure(mixed $uid): RedirectResponse|string
|
||||||
@ -231,7 +233,7 @@ abstract class CommonController extends BaseController
|
|||||||
//modify,toggle,batchjob 공통사용
|
//modify,toggle,batchjob 공통사용
|
||||||
protected function modify_process(mixed $uid): void
|
protected function modify_process(mixed $uid): void
|
||||||
{
|
{
|
||||||
$this->formDatas = $this->modify_validate($this->action, $this->fields);
|
$this->formDatas = $this->modify_validate($this->action, $this->fields);
|
||||||
//자신정보정의
|
//자신정보정의
|
||||||
$this->entity = $this->getService()->getModel()->getEntityByPK($uid);
|
$this->entity = $this->getService()->getModel()->getEntityByPK($uid);
|
||||||
if ($this->entity === null) {
|
if ($this->entity === null) {
|
||||||
@ -341,7 +343,7 @@ abstract class CommonController extends BaseController
|
|||||||
final public function batchjob(): RedirectResponse
|
final public function batchjob(): RedirectResponse
|
||||||
{
|
{
|
||||||
$this->init(__FUNCTION__);
|
$this->init(__FUNCTION__);
|
||||||
return $this->batchjob_procedure();
|
return $this->batchjob_procedure();
|
||||||
}
|
}
|
||||||
|
|
||||||
//삭제 delete,batchjob_delete 공통사용
|
//삭제 delete,batchjob_delete 공통사용
|
||||||
@ -435,7 +437,7 @@ abstract class CommonController extends BaseController
|
|||||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
return view(
|
return view(
|
||||||
$this->view_path . "view",
|
$this->view_path . "view",
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
protected function view_process_failed($message): RedirectResponse|string
|
protected function view_process_failed($message): RedirectResponse|string
|
||||||
|
|||||||
@ -17,7 +17,8 @@ class UserController extends CommonController
|
|||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
$this->title = lang("{$this->getService()->getClassPath()}.title");;
|
$this->title = lang("{$this->getService()->getClassPath()}.title");
|
||||||
|
;
|
||||||
$this->helper = new UserHelper();
|
$this->helper = new UserHelper();
|
||||||
}
|
}
|
||||||
protected function getService(): UserService
|
protected function getService(): UserService
|
||||||
@ -49,7 +50,7 @@ class UserController extends CommonController
|
|||||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
return view(
|
return view(
|
||||||
$this->view_path . "login",
|
$this->view_path . "login",
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
log_message("error", $e->getMessage());
|
log_message("error", $e->getMessage());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user