| @@ 41-52 (lines=12) @@ | ||
| 38 | $this->initVar('heading', XOBJ_DTYPE_TXTBOX); |
|
| 39 | $this->initVar('counter', XOBJ_DTYPE_INT, 0, false); |
|
| 40 | $this->initVar('lbr', XOBJ_DTYPE_INT, 0, false); |
|
| 41 | if ($coupid !== false) { |
|
| 42 | if (is_array($coupid)) { |
|
| 43 | $this->assignVars($coupid); |
|
| 44 | } else { |
|
| 45 | $couponHandler = xoops_getModuleHandler('coupon', $moddir); |
|
| 46 | $coupon = $couponHandler->get($coupid); |
|
| 47 | foreach ($coupon->vars as $k => $v) { |
|
| 48 | $this->assignVar($k, $v['value']); |
|
| 49 | } |
|
| 50 | unset($coupon); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| 55 | public function toArray() |
|
| @@ 62-73 (lines=12) @@ | ||
| 59 | $this->initVar('img', XOBJ_DTYPE_TXTBOX); |
|
| 60 | $this->initVar('allowreview', XOBJ_DTYPE_INT, 0, false); |
|
| 61 | ||
| 62 | if ($directory !== false) { |
|
| 63 | if (is_array($directory)) { |
|
| 64 | $this->assignVars($directory); |
|
| 65 | } else { |
|
| 66 | $directoryHandler = xoops_getModuleHandler('directory', $moddir); |
|
| 67 | $objDirectory = $directoryHandler->get($directory); |
|
| 68 | foreach ($objDirectory->vars as $k => $v) { |
|
| 69 | $this->assignVar($k, $v['value']); |
|
| 70 | } |
|
| 71 | unset($objDirectory); |
|
| 72 | } |
|
| 73 | } |
|
| 74 | } |
|
| 75 | } |
|
| 76 | ||
| @@ 74-85 (lines=12) @@ | ||
| 71 | $this->initVar('lon', XOBJ_DTYPE_TXTBOX, null, true); |
|
| 72 | $this->initVar('descr', XOBJ_DTYPE_TXTAREA); |
|
| 73 | ||
| 74 | if ($gmap !== false) { |
|
| 75 | if (is_array($gmap)) { |
|
| 76 | $this->assignVars($gmap); |
|
| 77 | } else { |
|
| 78 | $$gmapHandler = xoops_getModuleHandler('gmap', $moddir); |
|
| 79 | $objGmap =& $$gmapHandler->get($directory); |
|
| 80 | foreach ($objGmap->vars as $k => $v) { |
|
| 81 | $this->assignVar($k, $v['value']); |
|
| 82 | } |
|
| 83 | unset($objGmap); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|