1: <?php
2: 3: 4: 5:
6:
7: if (!defined('XOOPS_ROOT_PATH')) exit();
8:
9: require_once XOOPS_ROOT_PATH . "/core/XCube_ActionForm.class.php";
10:
11: 12: 13: 14:
15: class LegacyRender_ThemeSelectForm extends XCube_ActionForm
16: {
17: function getTokenName()
18: {
19: return "module.legacyRender.ThemeSelectForm.TOKEN";
20: }
21:
22: function prepare()
23: {
24:
25:
26:
27: $this->mFormProperties['select'] =new XCube_BoolArrayProperty('select');
28: $this->mFormProperties['choose'] =new XCube_StringArrayProperty('choose');
29: }
30:
31: 32: 33:
34: function getChooseTheme()
35: {
36: $ret = array();
37:
38: $themes = $this->get('choose');
39: foreach ($themes as $theme => $dmy) {
40: return $theme;
41: }
42:
43: return null;
44: }
45:
46: function load(&$objs)
47: {
48: foreach ($objs as $obj) {
49: $this->set('select', $obj->get('id'), $obj->get('enable_select'));
50: }
51: }
52:
53: function update(&$objs)
54: {
55: foreach (array_keys($objs) as $key) {
56: $objs[$key]->set('enable_select', $this->get('select', $objs[$key]->get('id')));
57: }
58: }
59: }
60:
61: ?>
62: