shoppingmallv2 init...
This commit is contained in:
parent
eded6d0637
commit
789d2c5cb7
@ -18,11 +18,4 @@ abstract class BaseHierarchyBackend extends BaseBackend
|
||||
{
|
||||
return $this->_model->reply($entity, $fieldDatas);
|
||||
}
|
||||
//View관련
|
||||
public function view($entity)
|
||||
{
|
||||
// view_cnt에 추가하기위함
|
||||
$this->_model->increaseViewCount($entity->getPrimaryKey());
|
||||
return parent::view($entity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,4 +36,12 @@ class BoardBackend extends BaseHierarchyBackend
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
//View관련
|
||||
public function view($entity)
|
||||
{
|
||||
//view_cnt에 추가하기위함
|
||||
$this->_model->increaseViewCount($entity->getPrimaryKey());
|
||||
return parent::view($entity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ class Services extends BaseService
|
||||
}
|
||||
return new \App\Backend\CategoryBackend();
|
||||
}
|
||||
public static function prodcut($getShared = true)
|
||||
public static function product($getShared = true)
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('product');
|
||||
|
||||
@ -515,7 +515,7 @@ abstract class BaseController extends Controller
|
||||
final public function download(string $field, $uid)
|
||||
{
|
||||
try {
|
||||
$entity = $this->_backend->getEntity([$this->_backend->getPrimaryKey() => $uid]);
|
||||
$entity = $this->_backend->getEntity($uid);
|
||||
if (!$entity->$field) {
|
||||
throw new \Exception("첨부파일이 확인되지 않습니다.");
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ function getFieldForm_CategoryHelper($field, $value, array $fieldFormOptions, ar
|
||||
// return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
||||
break;
|
||||
case "status":
|
||||
$fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("Categor.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
||||
$fieldFormOptions[$field] = [DEFAULTS['EMPTY'] => lang("Category.label.{$field}") . " 선택", ...$fieldFormOptions[$field]];
|
||||
return form_dropdown($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], $attributes);
|
||||
break;
|
||||
case 'updated_at':
|
||||
|
||||
@ -74,10 +74,10 @@ class CategoryModel extends BaseHierarchyModel
|
||||
$old_title = "";
|
||||
foreach ($this->where($conditions)->orderby("grpno DESC, grporder ASC")->findAll() as $entity) {
|
||||
if ($entity->getPrimaryKey() == $entity->getHierarchy_No()) {
|
||||
$options[$entity->getTitleField()] = [];
|
||||
$old_title = $entity->getTitleField();
|
||||
$options[$entity->getTitle()] = [];
|
||||
$old_title = $entity->getTitle();
|
||||
} else {
|
||||
$options[$old_title][$entity->getPrimaryKey()] = $entity->getTitleField();
|
||||
$options[$old_title][$entity->getPrimaryKey()] = $entity->getTitle();
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -22,12 +22,12 @@ class OrderModel extends BaseModel
|
||||
}
|
||||
final public function getFields(string $action = ""): array
|
||||
{
|
||||
$fields = [$this->getTitle(), "quantity", "price", "status"];
|
||||
$fields = [$this->getTitleField(), "quantity", "price", "status"];
|
||||
switch ($action) {
|
||||
case "index":
|
||||
case "excel":
|
||||
case "view":
|
||||
return [$this->getTitle(), "user_uid", "sess_id", "quantity", "price", "status", "updated_at", "created_at"];
|
||||
return [$this->getTitleField(), "user_uid", "sess_id", "quantity", "price", "status", "updated_at", "created_at"];
|
||||
break;
|
||||
default:
|
||||
return $fields;
|
||||
@ -36,7 +36,7 @@ class OrderModel extends BaseModel
|
||||
}
|
||||
final public function getFieldFilters(): array
|
||||
{
|
||||
return [$this->getTitle(), "user_uid", "status"];
|
||||
return [$this->getTitleField(), "user_uid", "status"];
|
||||
}
|
||||
final public function getFieldBatchFilters(): array
|
||||
{
|
||||
@ -45,7 +45,7 @@ class OrderModel extends BaseModel
|
||||
protected function getFieldRule(string $field, array $rules, string $action = ""): array
|
||||
{
|
||||
switch ($field) {
|
||||
case $this->getTitle():
|
||||
case $this->getTitleField():
|
||||
case "user_uid":
|
||||
$rules[$field] = "required|regex_match[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/]";
|
||||
break;
|
||||
@ -94,6 +94,6 @@ class OrderModel extends BaseModel
|
||||
public function setIndexWordFilter(string $word)
|
||||
{
|
||||
parent::setIndexWordFilter($word);
|
||||
$this->orLike($this->getTitle(), $word, "both");
|
||||
$this->orLike($this->getTitleField(), $word, "both");
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->getStatus() != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this);">
|
||||
<td>
|
||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPrimaryKey()}", "name" => "batchjob_uids[]", "value" => $entity->getPrimaryKey(), "class" => "batchjobuids_checkboxs"]); ?>
|
||||
<?= $total_count - (($page - 1) * $per_page + $i), ["target" => "_self"] ?>
|
||||
<?= $total_count - (($page - 1) * $per_page + $i) ?>
|
||||
</td>
|
||||
<?php foreach ($fields as $field) : ?>
|
||||
<td nowrap><?= getFieldIndex_Row_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user