shoppingmallv2 init...

This commit is contained in:
최준흠git config git config --helpgit config --global user.name 최준흠 2023-08-12 15:45:45 +09:00
parent 465ebb7a29
commit 063ab7ca7c

View File

@ -135,10 +135,10 @@ function getFieldIndex_Column_ProductHelper($field, array $viewDatas)
function getFieldIndex_Row_ProductHelper($field, $entity, array $viewDatas): string function getFieldIndex_Row_ProductHelper($field, $entity, array $viewDatas): string
{ {
$value = $entity->$field ?: DEFAULTS['EMPTY']; $value = $entity->$field ?: DEFAULTS['EMPTY'];
//front는 table을 사용하지 않는 점 주의
switch ($field) { switch ($field) {
case 'title': case 'title':
case 'name': case 'name':
//front는 table을 사용하지 않는 점 주의
return anchor( return anchor(
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category']->getPrimaryKey(), current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category']->getPrimaryKey(),
$value, $value,
@ -146,7 +146,7 @@ function getFieldIndex_Row_ProductHelper($field, $entity, array $viewDatas): str
); );
break; break;
default: default:
return sprintf("<td>%s</td>", getFieldView_ProductHelper($field, $entity, $viewDatas)); return getFieldView_ProductHelper($field, $entity, $viewDatas);
break; break;
} }
} // } //
@ -157,11 +157,15 @@ function getFieldIndex_Row_ProductHelper_Admin($field, $entity, array $viewDatas
switch ($field) { switch ($field) {
case 'title': case 'title':
case 'name': case 'name':
return sprintf("<td>%s</td>", anchor( return sprintf(
current_url() . '/view/' . $entity->getPrimaryKey(), "<td class='text-start'>%s<BR>%s</td>",
$value, $entity->getFileImage("middle", 'photo'),
["target" => "_self"] anchor(
)); current_url() . '/view/' . $entity->getPrimaryKey(),
$value,
["target" => "_self"]
)
);
break; break;
default: default:
if (in_array($field, $viewDatas['fieldFilters'])) { if (in_array($field, $viewDatas['fieldFilters'])) {
@ -174,7 +178,8 @@ function getFieldIndex_Row_ProductHelper_Admin($field, $entity, array $viewDatas
); );
return sprintf("<td>%s</td>", getFieldForm_ProductHelper($field, $entity->$field, $viewDatas, $attributes)); return sprintf("<td>%s</td>", getFieldForm_ProductHelper($field, $entity->$field, $viewDatas, $attributes));
} }
return getFieldIndex_Row_ProductHelper($field, $entity, $viewDatas); //front는 table을 사용하지 않는 점 주의
return sprintf("<td>%s</td>", getFieldIndex_Row_ProductHelper($field, $entity, $viewDatas));
break; break;
} }
} // } //