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