cfmgrv4 init...10
This commit is contained in:
parent
3ce374d1be
commit
5f6e6c7aaf
@ -511,10 +511,8 @@ abstract class CommonController extends BaseController
|
|||||||
$this->total_page = $pager->getPageCount($pager_group);
|
$this->total_page = $pager->getPageCount($pager_group);
|
||||||
return $pager->links($pager_group, $template);
|
return $pager->links($pager_group, $template);
|
||||||
}
|
}
|
||||||
protected function index_entitys_process(): array
|
protected function index_process_orderBy(): void
|
||||||
{
|
{
|
||||||
$this->index_condition_process();
|
|
||||||
//Sorting 처리
|
|
||||||
$this->order_field = $this->request->getVar('order_field') ?: DEFAULTS['EMPTY'];
|
$this->order_field = $this->request->getVar('order_field') ?: DEFAULTS['EMPTY'];
|
||||||
$this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY'];
|
$this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY'];
|
||||||
if ($this->order_field !== DEFAULTS['EMPTY'] && $this->order_value !== DEFAULTS['EMPTY']) {
|
if ($this->order_field !== DEFAULTS['EMPTY'] && $this->order_value !== DEFAULTS['EMPTY']) {
|
||||||
@ -532,10 +530,10 @@ abstract class CommonController extends BaseController
|
|||||||
"DESC"
|
"DESC"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
protected function index_process_limit(): void
|
||||||
|
{
|
||||||
$this->getService()->getModel()->limit($this->per_page, $this->page * $this->per_page - $this->per_page);
|
$this->getService()->getModel()->limit($this->per_page, $this->page * $this->per_page - $this->per_page);
|
||||||
$entitys = $this->getService()->getModel()->select($this->getService()->getModel()::TABLE . '.*')->findAll();
|
|
||||||
log_message("debug", $this->getService()->getModel()->getLastQuery());
|
|
||||||
return $entitys;
|
|
||||||
}
|
}
|
||||||
protected function index_process_result(): string
|
protected function index_process_result(): string
|
||||||
{
|
{
|
||||||
@ -555,7 +553,13 @@ abstract class CommonController extends BaseController
|
|||||||
//pagenation 처리
|
//pagenation 처리
|
||||||
$this->pagination = $this->index_pagination_process();
|
$this->pagination = $this->index_pagination_process();
|
||||||
//모델 처리
|
//모델 처리
|
||||||
$this->entitys = $this->index_entitys_process();
|
$this->index_condition_process();
|
||||||
|
//Sorting 처리
|
||||||
|
$this->index_process_orderBy();
|
||||||
|
//Limit관련
|
||||||
|
$this->index_process_limit();
|
||||||
|
$this->entitys = $this->getService()->getModel()->select($this->getService()->getModel()::TABLE . '.*')->findAll();
|
||||||
|
// log_message("debug", $this->getService()->getModel()->getLastQuery());
|
||||||
// 현재 URL을 스택에 저장
|
// 현재 URL을 스택에 저장
|
||||||
$this->myauth->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
|
$this->myauth->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
|
||||||
return $this->index_process_result();
|
return $this->index_process_result();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user