| 1: | <?php
|
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: |
|
| 19: |
|
| 20: |
|
| 21: |
|
| 22: | |
| 23: | |
| 24: |
|
| 25: | class ProfileRegstep extends XoopsObject
|
| 26: | {
|
| 27: | public $step_id;
|
| 28: | public $step_name;
|
| 29: | public $step_desc;
|
| 30: | public $step_order;
|
| 31: | public $step_save;
|
| 32: |
|
| 33: | |
| 34: | |
| 35: |
|
| 36: | public function __construct()
|
| 37: | {
|
| 38: | $this->initVar('step_id', XOBJ_DTYPE_INT);
|
| 39: | $this->initVar('step_name', XOBJ_DTYPE_TXTBOX);
|
| 40: | $this->initVar('step_desc', XOBJ_DTYPE_TXTAREA);
|
| 41: | $this->initVar('step_order', XOBJ_DTYPE_INT, 1);
|
| 42: | $this->initVar('step_save', XOBJ_DTYPE_INT, 0);
|
| 43: | }
|
| 44: | }
|
| 45: |
|
| 46: | |
| 47: | |
| 48: |
|
| 49: | class ProfileRegstepHandler extends XoopsPersistableObjectHandler
|
| 50: | {
|
| 51: | |
| 52: | |
| 53: |
|
| 54: | public function __construct($db)
|
| 55: | {
|
| 56: | parent::__construct($db, 'profile_regstep', 'profileregstep', 'step_id', 'step_name');
|
| 57: | }
|
| 58: |
|
| 59: | |
| 60: | |
| 61: | |
| 62: | |
| 63: | |
| 64: | |
| 65: | |
| 66: | |
| 67: |
|
| 68: | public function delete(XoopsObject $obj, $force = false)
|
| 69: | {
|
| 70: | if (parent::delete($obj, $force)) {
|
| 71: | $field_handler = xoops_getModuleHandler('field');
|
| 72: |
|
| 73: | return $field_handler->updateAll('step_id', 0, new Criteria('step_id', $obj->getVar('step_id')), $force);
|
| 74: | }
|
| 75: |
|
| 76: | return false;
|
| 77: | }
|
| 78: | }
|
| 79: | |