cfmgrv4 init...10
This commit is contained in:
parent
5f6e6c7aaf
commit
a1cf9ec11f
@ -511,7 +511,7 @@ abstract class CommonController extends BaseController
|
||||
$this->total_page = $pager->getPageCount($pager_group);
|
||||
return $pager->links($pager_group, $template);
|
||||
}
|
||||
protected function index_process_orderBy(): void
|
||||
protected function index_entitys_process_orderBy(): void
|
||||
{
|
||||
$this->order_field = $this->request->getVar('order_field') ?: DEFAULTS['EMPTY'];
|
||||
$this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY'];
|
||||
@ -531,10 +531,21 @@ abstract class CommonController extends BaseController
|
||||
));
|
||||
}
|
||||
}
|
||||
protected function index_process_limit(): void
|
||||
protected function index_entitys_process_limit(): void
|
||||
{
|
||||
$this->getService()->getModel()->limit($this->per_page, $this->page * $this->per_page - $this->per_page);
|
||||
}
|
||||
protected function index_entitys_process(): array
|
||||
{
|
||||
$this->index_condition_process();
|
||||
//Sorting 처리
|
||||
$this->index_entitys_process_orderBy();
|
||||
//Limit관련
|
||||
$this->index_entitys_process_limit();
|
||||
$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
|
||||
{
|
||||
return view(
|
||||
@ -553,13 +564,7 @@ abstract class CommonController extends BaseController
|
||||
//pagenation 처리
|
||||
$this->pagination = $this->index_pagination_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());
|
||||
$this->entitys = $this->index_entitys_process();
|
||||
// 현재 URL을 스택에 저장
|
||||
$this->myauth->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
|
||||
return $this->index_process_result();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user