@@ -16,27 +16,27 @@ |
||
16 | 16 | */ |
17 | 17 | class SmartFormImageUploadElement extends SmartFormUploadElement |
18 | 18 | { |
19 | - /** |
|
20 | - * SmartFormImageUploadElement constructor. |
|
21 | - * @param string $object |
|
22 | - * @param string $key |
|
23 | - */ |
|
24 | - public function __construct($object, $key) |
|
25 | - { |
|
26 | - $this->SmartFormFileElement($object, $key); |
|
27 | - // Override name for upload purposes |
|
28 | - $this->setName('upload_' . $key); |
|
29 | - } |
|
19 | + /** |
|
20 | + * SmartFormImageUploadElement constructor. |
|
21 | + * @param string $object |
|
22 | + * @param string $key |
|
23 | + */ |
|
24 | + public function __construct($object, $key) |
|
25 | + { |
|
26 | + $this->SmartFormFileElement($object, $key); |
|
27 | + // Override name for upload purposes |
|
28 | + $this->setName('upload_' . $key); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * prepare HTML for output |
|
33 | - * |
|
34 | - * @return string HTML |
|
35 | - */ |
|
36 | - public function render() |
|
37 | - { |
|
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
31 | + /** |
|
32 | + * prepare HTML for output |
|
33 | + * |
|
34 | + * @return string HTML |
|
35 | + */ |
|
36 | + public function render() |
|
37 | + { |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
39 | 39 | <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . " /> |
40 | 40 | <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName() . "' />"; |
41 | - } |
|
41 | + } |
|
42 | 42 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @package SmartObject |
10 | 10 | * @subpackage SmartObjectForm |
11 | 11 | */ |
12 | -include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformuploadelement.php'; |
|
12 | +include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformuploadelement.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class SmartFormImageUploadElement |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $this->SmartFormFileElement($object, $key); |
27 | 27 | // Override name for upload purposes |
28 | - $this->setName('upload_' . $key); |
|
28 | + $this->setName('upload_'.$key); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function render() |
37 | 37 | { |
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
39 | - <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . " /> |
|
40 | - <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName() . "' />"; |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' /> |
|
39 | + <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra()." /> |
|
40 | + <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName()."' />"; |
|
41 | 41 | } |
42 | 42 | } |
@@ -6,41 +6,41 @@ |
||
6 | 6 | */ |
7 | 7 | class SmartFormSection extends XoopsFormElement |
8 | 8 | { |
9 | - /** |
|
10 | - * Text |
|
11 | - * @var string |
|
12 | - * @access private |
|
13 | - */ |
|
14 | - public $_value; |
|
9 | + /** |
|
10 | + * Text |
|
11 | + * @var string |
|
12 | + * @access private |
|
13 | + */ |
|
14 | + public $_value; |
|
15 | 15 | |
16 | - /** |
|
17 | - * SmartFormSection constructor. |
|
18 | - * @param $sectionname |
|
19 | - * @param bool $value |
|
20 | - */ |
|
21 | - public function __construct($sectionname, $value = false) |
|
22 | - { |
|
23 | - $this->setName($sectionname); |
|
24 | - $this->_value = $value; |
|
25 | - } |
|
16 | + /** |
|
17 | + * SmartFormSection constructor. |
|
18 | + * @param $sectionname |
|
19 | + * @param bool $value |
|
20 | + */ |
|
21 | + public function __construct($sectionname, $value = false) |
|
22 | + { |
|
23 | + $this->setName($sectionname); |
|
24 | + $this->_value = $value; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * Get the text |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function getValue() |
|
33 | - { |
|
34 | - return $this->_value; |
|
35 | - } |
|
27 | + /** |
|
28 | + * Get the text |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function getValue() |
|
33 | + { |
|
34 | + return $this->_value; |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * Prepare HTML for output |
|
39 | - * |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function render() |
|
43 | - { |
|
44 | - return $this->getValue(); |
|
45 | - } |
|
37 | + /** |
|
38 | + * Prepare HTML for output |
|
39 | + * |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function render() |
|
43 | + { |
|
44 | + return $this->getValue(); |
|
45 | + } |
|
46 | 46 | } |
@@ -35,14 +35,14 @@ |
||
35 | 35 | */ |
36 | 36 | class SmartFormSelectElement extends XoopsFormElement |
37 | 37 | { |
38 | - /** |
|
39 | - * @param bool $withtags |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function renderValidationJS($withtags = true) |
|
43 | - { |
|
44 | - $js = ''; |
|
38 | + /** |
|
39 | + * @param bool $withtags |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function renderValidationJS($withtags = true) |
|
43 | + { |
|
44 | + $js = ''; |
|
45 | 45 | |
46 | - return $js; |
|
47 | - } |
|
46 | + return $js; |
|
47 | + } |
|
48 | 48 | } |
@@ -36,20 +36,20 @@ |
||
36 | 36 | */ |
37 | 37 | class SmartFormHidden extends XoopsFormHidden |
38 | 38 | { |
39 | - /** |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function render() |
|
43 | - { |
|
44 | - if (is_array($this->getValue())) { |
|
45 | - $ret = ''; |
|
46 | - foreach ($this->getValue() as $value) { |
|
47 | - $ret .= "<input type='hidden' name='" . $this->getName() . "[]' id='" . $this->getName() . "' value='" . $value . "' />\n"; |
|
48 | - } |
|
49 | - } else { |
|
50 | - $ret = "<input type='hidden' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' />"; |
|
51 | - } |
|
39 | + /** |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function render() |
|
43 | + { |
|
44 | + if (is_array($this->getValue())) { |
|
45 | + $ret = ''; |
|
46 | + foreach ($this->getValue() as $value) { |
|
47 | + $ret .= "<input type='hidden' name='" . $this->getName() . "[]' id='" . $this->getName() . "' value='" . $value . "' />\n"; |
|
48 | + } |
|
49 | + } else { |
|
50 | + $ret = "<input type='hidden' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' />"; |
|
51 | + } |
|
52 | 52 | |
53 | - return $ret; |
|
54 | - } |
|
53 | + return $ret; |
|
54 | + } |
|
55 | 55 | } |
@@ -44,10 +44,10 @@ |
||
44 | 44 | if (is_array($this->getValue())) { |
45 | 45 | $ret = ''; |
46 | 46 | foreach ($this->getValue() as $value) { |
47 | - $ret .= "<input type='hidden' name='" . $this->getName() . "[]' id='" . $this->getName() . "' value='" . $value . "' />\n"; |
|
47 | + $ret .= "<input type='hidden' name='".$this->getName()."[]' id='".$this->getName()."' value='".$value."' />\n"; |
|
48 | 48 | } |
49 | 49 | } else { |
50 | - $ret = "<input type='hidden' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' />"; |
|
50 | + $ret = "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />"; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return $ret; |
@@ -11,13 +11,13 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormDate_timeElement extends XoopsFormDateTime |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormDate_timeElement constructor. |
|
16 | - * @param mixed $object |
|
17 | - * @param mixed $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - parent::__construct($object->vars[$key]['form_caption'], $key, 15, $object->getVar($key, 'e')); |
|
22 | - } |
|
14 | + /** |
|
15 | + * SmartFormDate_timeElement constructor. |
|
16 | + * @param mixed $object |
|
17 | + * @param mixed $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + parent::__construct($object->vars[$key]['form_caption'], $key, 15, $object->getVar($key, 'e')); |
|
22 | + } |
|
23 | 23 | } |
@@ -6,41 +6,41 @@ |
||
6 | 6 | */ |
7 | 7 | class SmartFormSectionClose extends XoopsFormElement |
8 | 8 | { |
9 | - /** |
|
10 | - * Text |
|
11 | - * @var string |
|
12 | - * @access private |
|
13 | - */ |
|
14 | - public $_value; |
|
9 | + /** |
|
10 | + * Text |
|
11 | + * @var string |
|
12 | + * @access private |
|
13 | + */ |
|
14 | + public $_value; |
|
15 | 15 | |
16 | - /** |
|
17 | - * SmartFormSectionClose constructor. |
|
18 | - * @param $sectionname |
|
19 | - * @param bool $value |
|
20 | - */ |
|
21 | - public function __construct($sectionname, $value = false) |
|
22 | - { |
|
23 | - $this->setName($sectionname); |
|
24 | - $this->_value = $value; |
|
25 | - } |
|
16 | + /** |
|
17 | + * SmartFormSectionClose constructor. |
|
18 | + * @param $sectionname |
|
19 | + * @param bool $value |
|
20 | + */ |
|
21 | + public function __construct($sectionname, $value = false) |
|
22 | + { |
|
23 | + $this->setName($sectionname); |
|
24 | + $this->_value = $value; |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * Get the text |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function getValue() |
|
33 | - { |
|
34 | - return $this->_value; |
|
35 | - } |
|
27 | + /** |
|
28 | + * Get the text |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function getValue() |
|
33 | + { |
|
34 | + return $this->_value; |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * Prepare HTML for output |
|
39 | - * |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function render() |
|
43 | - { |
|
44 | - return $this->getValue(); |
|
45 | - } |
|
37 | + /** |
|
38 | + * Prepare HTML for output |
|
39 | + * |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function render() |
|
43 | + { |
|
44 | + return $this->getValue(); |
|
45 | + } |
|
46 | 46 | } |
@@ -11,54 +11,54 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormRadioElement extends XoopsFormRadio |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormRadioElement constructor. |
|
16 | - * @param string $object |
|
17 | - * @param string $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - $var = $object->vars[$key]; |
|
14 | + /** |
|
15 | + * SmartFormRadioElement constructor. |
|
16 | + * @param string $object |
|
17 | + * @param string $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + $var = $object->vars[$key]; |
|
22 | 22 | |
23 | - parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
23 | + parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
24 | 24 | |
25 | - // Adding the options inside this SelectBox |
|
26 | - // If the custom method is not from a module, than it's from the core |
|
27 | - $control = $object->getControl($key); |
|
25 | + // Adding the options inside this SelectBox |
|
26 | + // If the custom method is not from a module, than it's from the core |
|
27 | + $control = $object->getControl($key); |
|
28 | 28 | |
29 | - if (isset($control['options'])) { |
|
30 | - $this->addOptionArray($control['options']); |
|
31 | - } else { |
|
32 | - // let's find if the method we need to call comes from an already defined object |
|
33 | - if (isset($control['object'])) { |
|
34 | - if (method_exists($control['object'], $control['method'])) { |
|
35 | - if ($option_array = $control['object']->{$control['method']}()) { |
|
36 | - // Adding the options array to the XoopsFormSelect |
|
37 | - $this->addOptionArray($option_array); |
|
38 | - } |
|
39 | - } |
|
40 | - } else { |
|
41 | - // finding the itemHandler; if none, let's take the itemHandler of the $object |
|
42 | - if (isset($control['itemHandler'])) { |
|
43 | - if (!$control['module']) { |
|
44 | - // Creating the specified core object handler |
|
45 | - $controlHandler = xoops_getHandler($control['itemHandler']); |
|
46 | - } else { |
|
47 | - $controlHandler = xoops_getModuleHandler($control['itemHandler'], $control['module']); |
|
48 | - } |
|
49 | - } else { |
|
50 | - $controlHandler =& $object->handler; |
|
51 | - } |
|
29 | + if (isset($control['options'])) { |
|
30 | + $this->addOptionArray($control['options']); |
|
31 | + } else { |
|
32 | + // let's find if the method we need to call comes from an already defined object |
|
33 | + if (isset($control['object'])) { |
|
34 | + if (method_exists($control['object'], $control['method'])) { |
|
35 | + if ($option_array = $control['object']->{$control['method']}()) { |
|
36 | + // Adding the options array to the XoopsFormSelect |
|
37 | + $this->addOptionArray($option_array); |
|
38 | + } |
|
39 | + } |
|
40 | + } else { |
|
41 | + // finding the itemHandler; if none, let's take the itemHandler of the $object |
|
42 | + if (isset($control['itemHandler'])) { |
|
43 | + if (!$control['module']) { |
|
44 | + // Creating the specified core object handler |
|
45 | + $controlHandler = xoops_getHandler($control['itemHandler']); |
|
46 | + } else { |
|
47 | + $controlHandler = xoops_getModuleHandler($control['itemHandler'], $control['module']); |
|
48 | + } |
|
49 | + } else { |
|
50 | + $controlHandler =& $object->handler; |
|
51 | + } |
|
52 | 52 | |
53 | - // Checking if the specified method exists |
|
54 | - if (method_exists($controlHandler, $control['method'])) { |
|
55 | - // TODO: How could I pass the parameters in the following call ... |
|
56 | - if ($option_array = $controlHandler->{$control['method']}()) { |
|
57 | - // Adding the options array to the XoopsFormSelect |
|
58 | - $this->addOptionArray($option_array); |
|
59 | - } |
|
60 | - } |
|
61 | - } |
|
62 | - } |
|
63 | - } |
|
53 | + // Checking if the specified method exists |
|
54 | + if (method_exists($controlHandler, $control['method'])) { |
|
55 | + // TODO: How could I pass the parameters in the following call ... |
|
56 | + if ($option_array = $controlHandler->{$control['method']}()) { |
|
57 | + // Adding the options array to the XoopsFormSelect |
|
58 | + $this->addOptionArray($option_array); |
|
59 | + } |
|
60 | + } |
|
61 | + } |
|
62 | + } |
|
63 | + } |
|
64 | 64 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $controlHandler = xoops_getModuleHandler($control['itemHandler'], $control['module']); |
53 | 53 | } |
54 | 54 | } else { |
55 | - $controlHandler =& $object->handler; |
|
55 | + $controlHandler = & $object->handler; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Checking if the specified method exists |
@@ -11,59 +11,59 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormParentCategoryElement extends XoopsFormSelect |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormParentcategoryElement constructor. |
|
16 | - * @param string $object |
|
17 | - * @param string $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - $addNoParent = isset($object->controls[$key]['addNoParent']) ? $object->controls[$key]['addNoParent'] : true; |
|
22 | - $criteria = new CriteriaCompo(); |
|
23 | - $criteria->setSort('weight, name'); |
|
24 | - $categoryHandler = xoops_getModuleHandler('category', $object->handler->_moduleName); |
|
25 | - $categories = $categoryHandler->getObjects($criteria); |
|
14 | + /** |
|
15 | + * SmartFormParentcategoryElement constructor. |
|
16 | + * @param string $object |
|
17 | + * @param string $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + $addNoParent = isset($object->controls[$key]['addNoParent']) ? $object->controls[$key]['addNoParent'] : true; |
|
22 | + $criteria = new CriteriaCompo(); |
|
23 | + $criteria->setSort('weight, name'); |
|
24 | + $categoryHandler = xoops_getModuleHandler('category', $object->handler->_moduleName); |
|
25 | + $categories = $categoryHandler->getObjects($criteria); |
|
26 | 26 | |
27 | - include_once(XOOPS_ROOT_PATH . '/class/tree.php'); |
|
28 | - $mytree = new XoopsObjectTree($categories, 'categoryid', 'parentid'); |
|
29 | - parent::__construct($object->vars[$key]['form_caption'], $key, $object->getVar($key, 'e')); |
|
27 | + include_once(XOOPS_ROOT_PATH . '/class/tree.php'); |
|
28 | + $mytree = new XoopsObjectTree($categories, 'categoryid', 'parentid'); |
|
29 | + parent::__construct($object->vars[$key]['form_caption'], $key, $object->getVar($key, 'e')); |
|
30 | 30 | |
31 | - $ret = array(); |
|
32 | - $options = $this->getOptionArray($mytree, 'name', 0, '', $ret); |
|
33 | - if ($addNoParent) { |
|
34 | - $newOptions = array('0' => '----'); |
|
35 | - foreach ($options as $k => $v) { |
|
36 | - $newOptions[$k] = $v; |
|
37 | - } |
|
38 | - $options = $newOptions; |
|
39 | - } |
|
40 | - $this->addOptionArray($options); |
|
41 | - } |
|
31 | + $ret = array(); |
|
32 | + $options = $this->getOptionArray($mytree, 'name', 0, '', $ret); |
|
33 | + if ($addNoParent) { |
|
34 | + $newOptions = array('0' => '----'); |
|
35 | + foreach ($options as $k => $v) { |
|
36 | + $newOptions[$k] = $v; |
|
37 | + } |
|
38 | + $options = $newOptions; |
|
39 | + } |
|
40 | + $this->addOptionArray($options); |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get options for a category select with hierarchy (recursive) |
|
45 | - * |
|
46 | - * @param XoopsObjectTree $tree |
|
47 | - * @param string $fieldName |
|
48 | - * @param int $key |
|
49 | - * @param string $prefix_curr |
|
50 | - * @param array $ret |
|
51 | - * |
|
52 | - * @return array |
|
53 | - */ |
|
54 | - public function getOptionArray($tree, $fieldName, $key, $prefix_curr = '', &$ret) |
|
55 | - { |
|
56 | - if ($key > 0) { |
|
57 | - $value = $tree->_tree[$key]['obj']->getVar($tree->_myId); |
|
58 | - $ret[$key] = $prefix_curr . $tree->_tree[$key]['obj']->getVar($fieldName); |
|
59 | - $prefix_curr .= '-'; |
|
60 | - } |
|
61 | - if (isset($tree->_tree[$key]['child']) && !empty($tree->_tree[$key]['child'])) { |
|
62 | - foreach ($tree->_tree[$key]['child'] as $childkey) { |
|
63 | - $this->getOptionArray($tree, $fieldName, $childkey, $prefix_curr, $ret); |
|
64 | - } |
|
65 | - } |
|
43 | + /** |
|
44 | + * Get options for a category select with hierarchy (recursive) |
|
45 | + * |
|
46 | + * @param XoopsObjectTree $tree |
|
47 | + * @param string $fieldName |
|
48 | + * @param int $key |
|
49 | + * @param string $prefix_curr |
|
50 | + * @param array $ret |
|
51 | + * |
|
52 | + * @return array |
|
53 | + */ |
|
54 | + public function getOptionArray($tree, $fieldName, $key, $prefix_curr = '', &$ret) |
|
55 | + { |
|
56 | + if ($key > 0) { |
|
57 | + $value = $tree->_tree[$key]['obj']->getVar($tree->_myId); |
|
58 | + $ret[$key] = $prefix_curr . $tree->_tree[$key]['obj']->getVar($fieldName); |
|
59 | + $prefix_curr .= '-'; |
|
60 | + } |
|
61 | + if (isset($tree->_tree[$key]['child']) && !empty($tree->_tree[$key]['child'])) { |
|
62 | + foreach ($tree->_tree[$key]['child'] as $childkey) { |
|
63 | + $this->getOptionArray($tree, $fieldName, $childkey, $prefix_curr, $ret); |
|
64 | + } |
|
65 | + } |
|
66 | 66 | |
67 | - return $ret; |
|
68 | - } |
|
67 | + return $ret; |
|
68 | + } |
|
69 | 69 | } |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $criteria = new CriteriaCompo(); |
23 | 23 | $criteria->setSort('weight, name'); |
24 | 24 | $categoryHandler = xoops_getModuleHandler('category', $object->handler->_moduleName); |
25 | - $categories = $categoryHandler->getObjects($criteria); |
|
25 | + $categories = $categoryHandler->getObjects($criteria); |
|
26 | 26 | |
27 | - include_once(XOOPS_ROOT_PATH . '/class/tree.php'); |
|
27 | + include_once(XOOPS_ROOT_PATH.'/class/tree.php'); |
|
28 | 28 | $mytree = new XoopsObjectTree($categories, 'categoryid', 'parentid'); |
29 | 29 | parent::__construct($object->vars[$key]['form_caption'], $key, $object->getVar($key, 'e')); |
30 | 30 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | if ($key > 0) { |
57 | 57 | $value = $tree->_tree[$key]['obj']->getVar($tree->_myId); |
58 | - $ret[$key] = $prefix_curr . $tree->_tree[$key]['obj']->getVar($fieldName); |
|
58 | + $ret[$key] = $prefix_curr.$tree->_tree[$key]['obj']->getVar($fieldName); |
|
59 | 59 | $prefix_curr .= '-'; |
60 | 60 | } |
61 | 61 | if (isset($tree->_tree[$key]['child']) && !empty($tree->_tree[$key]['child'])) { |
@@ -16,14 +16,14 @@ |
||
16 | 16 | */ |
17 | 17 | class SmartFormSelect_multiElement extends SmartFormSelectElement |
18 | 18 | { |
19 | - /** |
|
20 | - * SmartFormSelect_multiElement constructor. |
|
21 | - * @param string $object |
|
22 | - * @param string $key |
|
23 | - */ |
|
24 | - public function __construct($object, $key) |
|
25 | - { |
|
26 | - $this->multiple = true; |
|
27 | - parent::__construct($object, $key); |
|
28 | - } |
|
19 | + /** |
|
20 | + * SmartFormSelect_multiElement constructor. |
|
21 | + * @param string $object |
|
22 | + * @param string $key |
|
23 | + */ |
|
24 | + public function __construct($object, $key) |
|
25 | + { |
|
26 | + $this->multiple = true; |
|
27 | + parent::__construct($object, $key); |
|
28 | + } |
|
29 | 29 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * @package SmartObject |
10 | 10 | * @subpackage SmartObjectForm |
11 | 11 | */ |
12 | -include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformselectelement.php'); |
|
12 | +include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformselectelement.php'); |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class SmartFormSelect_multiElement |