cfmgrv3 init...3
This commit is contained in:
parent
f201e7636c
commit
53480cf64e
@ -160,8 +160,8 @@ class CommonController extends BaseController
|
||||
}
|
||||
final public function update_form($uid)
|
||||
{
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
try {
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$this->update_init();
|
||||
$this->update_form_init();
|
||||
$this->_viewDatas['entity'] = $this->update_form_process($entity);
|
||||
@ -201,9 +201,9 @@ class CommonController extends BaseController
|
||||
}
|
||||
final public function update($uid)
|
||||
{
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$message = "";
|
||||
try {
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$this->update_init();
|
||||
$entity = $this->update_validate($entity);
|
||||
$entity = $this->update_process($entity);
|
||||
@ -256,9 +256,9 @@ class CommonController extends BaseController
|
||||
}
|
||||
public function toggle($uid, string $field)
|
||||
{
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$message = "";
|
||||
try {
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$this->toggle_init($field);
|
||||
$entity = $this->toggle_validate($entity);
|
||||
$entity = $this->toggle_process($entity);
|
||||
@ -354,10 +354,9 @@ class CommonController extends BaseController
|
||||
}
|
||||
final public function delete($uid)
|
||||
{
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$message = "";
|
||||
try {
|
||||
$entity = $this->_model->getEntity($uid);
|
||||
$entity = $this->delete_process($entity);
|
||||
$message = "{$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.";
|
||||
Log::save("{$this->_viewDatas['title']} {$message}");
|
||||
return alert_CommonHelper($message, session()->get(RETURN_URL));
|
||||
|
||||
@ -4,8 +4,10 @@ namespace App\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
abstract class CommonEntity extends Entity
|
||||
class CommonEntity extends Entity
|
||||
{
|
||||
abstract public function getPrimaryKey();
|
||||
abstract public function getTitle();
|
||||
}
|
||||
public function getTitle()
|
||||
{
|
||||
return "CommonEntity";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user