@@ -78,6 +78,9 @@ |
||
| 78 | 78 | 'maxlength' => 6)); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | + /** |
|
| 82 | + * @param string $key |
|
| 83 | + */ |
|
| 81 | 84 | function getVar($key, $format = 's') { |
| 82 | 85 | if ($format == 's' && in_array($key, array())) { |
| 83 | 86 | return call_user_func(array($this,$key)); |
@@ -73,6 +73,9 @@ |
||
| 73 | 73 | $this->hideFieldFromForm('default_currency'); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $key |
|
| 78 | + */ |
|
| 76 | 79 | function getVar($key, $format = 's') { |
| 77 | 80 | if ($format == 's' && in_array($key, array('rate', 'default_currency'))) { |
| 78 | 81 | return call_user_func(array($this,$key)); |
@@ -57,6 +57,9 @@ |
||
| 57 | 57 | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | + /** |
|
| 61 | + * @param string $key |
|
| 62 | + */ |
|
| 60 | 63 | function getVar($key, $format = 's') { |
| 61 | 64 | if ($format == 's' && in_array($key, array())) { |
| 62 | 65 | return call_user_func(array($this,$key)); |
@@ -39,12 +39,6 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * Constructor |
| 41 | 41 | * |
| 42 | - * @param string $caption Caption |
|
| 43 | - * @param string $name "name" attribute |
|
| 44 | - * @param int $size Size of the field |
|
| 45 | - * @param int $maxlength Maximum length of the text |
|
| 46 | - * @param int $value Initial value of the field. |
|
| 47 | - * <b>Warning:</b> this is readable in cleartext in the page's source! |
|
| 48 | 42 | */ |
| 49 | 43 | function SmartFormSet_passwordElement($object, $key){ |
| 50 | 44 | |
@@ -11,6 +11,10 @@ |
||
| 11 | 11 | * @subpackage SmartObjectForm |
| 12 | 12 | */ |
| 13 | 13 | class SmartFormTextElement extends XoopsFormText { |
| 14 | + |
|
| 15 | + /** |
|
| 16 | + * @param string $key |
|
| 17 | + */ |
|
| 14 | 18 | function SmartFormTextElement($object, $key) { |
| 15 | 19 | $var = $object->vars[$key]; |
| 16 | 20 | |
@@ -42,6 +42,10 @@ discard block |
||
| 42 | 42 | var $_form_caption=false; |
| 43 | 43 | var $_submit_button_caption=false; |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param SmartObject $target |
|
| 47 | + * @param boolean $form_action |
|
| 48 | + */ |
|
| 45 | 49 | function SmartobjectForm(&$target, $form_name, $form_caption, $form_action, $form_fields=null, $submit_button_caption = false, $cancel_js_action=false, $captcha=false) { |
| 46 | 50 | |
| 47 | 51 | $this->targetObject =& $target; |
@@ -88,7 +92,7 @@ discard block |
||
| 88 | 92 | * Add an element to the form |
| 89 | 93 | * |
| 90 | 94 | * @param object &$formElement reference to a {@link XoopsFormElement} |
| 91 | - * @param bool $required is this a "required" element? |
|
| 95 | + * @param string|boolean $required is this a "required" element? |
|
| 92 | 96 | */ |
| 93 | 97 | function addElement(&$formElement, $key=false, $var=false, $required='notset'){ |
| 94 | 98 | if ($key) { |
@@ -65,6 +65,9 @@ |
||
| 65 | 65 | 'method' => 'getRateList')); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param string $key |
|
| 70 | + */ |
|
| 68 | 71 | function getVar($key, $format = 's') { |
| 69 | 72 | if ($format == 's' && in_array($key, array('name', 'dirname'))) { |
| 70 | 73 | return call_user_func(array($this,$key)); |
@@ -129,6 +129,10 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | return $fields; |
| 131 | 131 | } |
| 132 | + |
|
| 133 | + /** |
|
| 134 | + * @param string $field |
|
| 135 | + */ |
|
| 132 | 136 | function fieldExists($field) { |
| 133 | 137 | $existingFields = $this->getExistingFieldsArray(); |
| 134 | 138 | return isset ($existingFields[$field]); |
@@ -541,7 +545,7 @@ discard block |
||
| 541 | 545 | /** |
| 542 | 546 | * Use to update a table |
| 543 | 547 | * |
| 544 | - * @param object $table {@link SmartDbTable} that will be updated |
|
| 548 | + * @param SmartDbTable $table {@link SmartDbTable} that will be updated |
|
| 545 | 549 | * |
| 546 | 550 | * @see SmartDbTable |
| 547 | 551 | * |
@@ -601,6 +605,9 @@ discard block |
||
| 601 | 605 | return $ret; |
| 602 | 606 | } |
| 603 | 607 | |
| 608 | + /** |
|
| 609 | + * @return string |
|
| 610 | + */ |
|
| 604 | 611 | function getFieldDefaultFromVar($var, $key = false) { |
| 605 | 612 | if ($var['value']) { |
| 606 | 613 | return $var['value']; |
@@ -177,6 +177,10 @@ discard block |
||
| 177 | 177 | return implode($separator, $ret); |
| 178 | 178 | |
| 179 | 179 | } |
| 180 | + |
|
| 181 | + /** |
|
| 182 | + * @param false|string $trimFunction |
|
| 183 | + */ |
|
| 180 | 184 | function valToCsvHelper($val, $separator, $trimFunction) { |
| 181 | 185 | if ($trimFunction) |
| 182 | 186 | $val = $trimFunction ($val); |
@@ -221,6 +225,9 @@ discard block |
||
| 221 | 225 | $this->saveExportFile($exportFileData); |
| 222 | 226 | } |
| 223 | 227 | |
| 228 | + /** |
|
| 229 | + * @param string $content |
|
| 230 | + */ |
|
| 224 | 231 | function saveExportFile($content) { |
| 225 | 232 | switch ($this->format) { |
| 226 | 233 | case 'csv': |