shoppingmallv2 init...
This commit is contained in:
parent
3a1303a08d
commit
e9d2f577d0
@ -51,11 +51,21 @@ class BoardConfigModel extends BaseModel
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
public function getEntity($conditions): BoardConfigEntity
|
||||
//Form 선택용 Options Data용
|
||||
public function getOptions(array $conditions = array(), $options = array()): array
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
foreach ($this->getEntitys($conditions) as $entity) {
|
||||
// STATUS가 use가 아닐때 option을 disabled되게 하기위함
|
||||
if ($entity->getStatus() != DEFAULTS['STATUS']) {
|
||||
$options[$entity->getPrimaryKey() . "\" disabled=\"disabled"] = $entity->getTitle();
|
||||
} else {
|
||||
$options[$entity->getPrimaryKey()] = $entity->getTitle();
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
//Field별 Form Option용
|
||||
protected function changeFormData(string $action, string $field, array $formDatas, $entity)
|
||||
{
|
||||
switch ($field) {
|
||||
@ -82,6 +92,11 @@ class BoardConfigModel extends BaseModel
|
||||
}
|
||||
return $entity;
|
||||
}
|
||||
|
||||
public function getEntity($conditions): BoardConfigEntity
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
}
|
||||
public function create(array $formDatas): BoardConfigEntity
|
||||
{
|
||||
return $this->create_process(new BoardConfigEntity(), $formDatas);
|
||||
|
||||
@ -40,11 +40,7 @@ class CategoryModel extends BaseHierarchyModel
|
||||
return $rules;
|
||||
}
|
||||
|
||||
public function getEntity($conditions): CategoryEntity
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
}
|
||||
|
||||
//Form 선택용 Options Data용
|
||||
public function getOptions(array $conditions = array(), $options = array()): array
|
||||
{
|
||||
//대분류 부분은 선택이 되지 않게 하기위해 따로 만듬 (form_dropdown의 optgroup 기능)
|
||||
@ -54,12 +50,22 @@ class CategoryModel extends BaseHierarchyModel
|
||||
$options[$entity->getTitle()] = [];
|
||||
$old_title = $entity->getTitle();
|
||||
} else {
|
||||
$options[$old_title][$entity->getPrimaryKey()] = $entity->getTitle();
|
||||
// STATUS가 use가 아닐때 option을 disabled되게 하기위함
|
||||
if ($entity->getStatus() != DEFAULTS['STATUS']) {
|
||||
$options[$old_title][$entity->getPrimaryKey() . "\" disabled=\"disabled"] = $entity->getTitle();
|
||||
} else {
|
||||
$options[$old_title][$entity->getPrimaryKey()] = $entity->getTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
public function getEntity($conditions): CategoryEntity
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
}
|
||||
|
||||
public function create(array $formDatas): CategoryEntity
|
||||
{
|
||||
return $this->create_process(new CategoryEntity(), $formDatas);
|
||||
|
||||
@ -60,7 +60,19 @@ class ProductModel extends BaseModel
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
|
||||
//Form 선택용 Options Data용
|
||||
public function getOptions(array $conditions = array(), $options = array()): array
|
||||
{
|
||||
foreach ($this->getEntitys($conditions) as $entity) {
|
||||
// STATUS가 use가 아닐때 option을 disabled되게 하기위함
|
||||
if ($entity->getStatus() != DEFAULTS['STATUS']) {
|
||||
$options[$entity->getPrimaryKey() . "\" disabled=\"disabled"] = $entity->getTitle();
|
||||
} else {
|
||||
$options[$entity->getPrimaryKey()] = $entity->getTitle();
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
//Field별 Form Option용
|
||||
public function getFieldFormOption(string $field): array
|
||||
{
|
||||
|
||||
@ -54,10 +54,7 @@ class UserModel extends BaseModel
|
||||
}
|
||||
return $rules;
|
||||
}
|
||||
public function getEntity($conditions): UserEntity
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
}
|
||||
//Form 선택용 Options Data용
|
||||
public function getOptions(array $conditions = array(), $options = array()): array
|
||||
{
|
||||
foreach ($this->getEntitys($conditions) as $entity) {
|
||||
@ -70,6 +67,12 @@ class UserModel extends BaseModel
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
public function getEntity($conditions): UserEntity
|
||||
{
|
||||
return parent::getEntity($conditions);
|
||||
}
|
||||
|
||||
protected function changeFormData(string $action, string $field, array $formDatas, $entity)
|
||||
{
|
||||
switch ($field) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user