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