shoppingmallv2 init...

This commit is contained in:
최준흠 2023-08-24 09:40:36 +09:00
parent 0d494e82cb
commit 15219e68f3
2 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,7 @@ abstract class BaseController extends Controller
protected $_session = null;
protected $_viewPath = '';
protected $_viewDatas = array();
protected $_per_page = DEFAULTS['PERPAGE'];
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
// Do Not Edit This Line
@ -579,7 +580,7 @@ abstract class BaseController extends Controller
// log_message("debug", __METHOD__ . "에서 TotalCount 호출:" . $this->_model->getLastQuery());
//Page, Per_page필요부분
$this->_viewDatas['page'] = (int)$this->request->getVar('page') ?: 1;
$this->_viewDatas['per_page'] = (int)$this->request->getVar('per_page') ?: DEFAULTS['PERPAGE'];
$this->_viewDatas['per_page'] = (int)$this->request->getVar('per_page') ?: $this->_per_page;
$this->_viewDatas['uri'] = $this->request->getUri();
//줄수 처리용
$this->_viewDatas['pageOptions'] = array("" => "줄수선택");

View File

@ -18,6 +18,7 @@ class ProductController extends FrontController
$this->_viewDatas['title'] = lang($this->_viewDatas['className'] . '.title');
$this->_viewDatas['class_icon'] = CLASS_ICONS[strtoupper($this->_viewDatas['className'])];
helper($this->_viewDatas['className']);
$this->_per_page = 10;
}
public function getFields(string $action = ""): array
{