@@ -12,7 +12,7 @@ |
||
12 | 12 | /** |
13 | 13 | * Access the only instance of this class |
14 | 14 | * |
15 | - * @return object |
|
15 | + * @return SmartHookHandler |
|
16 | 16 | * |
17 | 17 | * @static |
18 | 18 | * @staticvar object |
@@ -156,17 +156,26 @@ discard block |
||
156 | 156 | $this->_title = $ret; |
157 | 157 | } |
158 | 158 | |
159 | + /** |
|
160 | + * @param string|boolean $keywords |
|
161 | + */ |
|
159 | 162 | function setKeywords($keywords) |
160 | 163 | { |
161 | 164 | $this->_keywords = $keywords; |
162 | 165 | } |
163 | 166 | |
167 | + /** |
|
168 | + * @param boolean $categoryPath |
|
169 | + */ |
|
164 | 170 | function setCategoryPath($categoryPath) |
165 | 171 | { |
166 | 172 | $categoryPath = $this->html2text($categoryPath); |
167 | 173 | $this->_categoryPath = $categoryPath; |
168 | 174 | } |
169 | 175 | |
176 | + /** |
|
177 | + * @param boolean $description |
|
178 | + */ |
|
170 | 179 | function setDescription($description) |
171 | 180 | { |
172 | 181 | if (!$description) { |
@@ -217,6 +226,10 @@ discard block |
||
217 | 226 | return $ret; |
218 | 227 | } |
219 | 228 | |
229 | + /** |
|
230 | + * @param string $text |
|
231 | + * @param integer $minChar |
|
232 | + */ |
|
220 | 233 | function findMetaKeywords($text, $minChar) |
221 | 234 | { |
222 | 235 | $keywords = array(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Checks if the user has a specific access on this object |
70 | 70 | * |
71 | - * @param string $gperm_name name of the permission to test |
|
71 | + * @param string $perm_name name of the permission to test |
|
72 | 72 | * @return boolean : TRUE if user has access, false if not |
73 | 73 | **/ |
74 | 74 | function accessGranted($perm_name) { |
@@ -127,6 +127,9 @@ discard block |
||
127 | 127 | 'readonly' => false)); |
128 | 128 | } |
129 | 129 | |
130 | + /** |
|
131 | + * @param string $key |
|
132 | + */ |
|
130 | 133 | function initNonPersistableVar($key, $data_type, $itemName=false, $form_caption='', $sortby=false, $value='', $displayOnForm=false, $required=false) { |
131 | 134 | $this->initVar($key, $data_type, $value, $required, null, '', false, $form_caption, '', $sortby, false, $displayOnForm); |
132 | 135 | $this->vars[$key]['itemName'] = $itemName; |
@@ -145,13 +148,16 @@ discard block |
||
145 | 148 | * @param bool $required set to TRUE if this variable needs to have a value set before storing the object in the table |
146 | 149 | * @param string $form_caption caption of this variable in a {@link SmartobjectForm} and title of a column in a {@link SmartObjectTable} |
147 | 150 | * @param string $form_dsc description of this variable in a {@link SmartobjectForm} |
148 | - * @param mixed $value default value of this variable |
|
151 | + * @param string|false $value default value of this variable |
|
149 | 152 | */ |
150 | 153 | function quickInitVar($key, $data_type, $required=false, $form_caption='', $form_dsc='', $value = null) { |
151 | 154 | $maxlength = $data_type == 'XOBJ_DTYPE_TXTBOX' ? 255 : null; |
152 | 155 | $this->initVar($key, $data_type, $value, $required, $maxlength, '', false, $form_caption, $form_dsc, false, true, true); |
153 | 156 | } |
154 | 157 | |
158 | + /** |
|
159 | + * @param string $varname |
|
160 | + */ |
|
155 | 161 | function initCommonVar($varname, $displayOnForm=true, $default='notdefined') { |
156 | 162 | |
157 | 163 | switch ($varname) { |
@@ -393,8 +399,8 @@ discard block |
||
393 | 399 | /** |
394 | 400 | * add an error |
395 | 401 | * |
396 | - * @param string $value error to add |
|
397 | 402 | * @access public |
403 | + * @param string $err_str |
|
398 | 404 | */ |
399 | 405 | function setErrors($err_str, $prefix=false) |
400 | 406 | { |
@@ -585,10 +591,17 @@ discard block |
||
585 | 591 | $this->vars[$key]['data_type'] = $newType; |
586 | 592 | } |
587 | 593 | |
594 | + /** |
|
595 | + * @param string $info |
|
596 | + * @param boolean $value |
|
597 | + */ |
|
588 | 598 | function setVarInfo($key, $info, $value) { |
589 | 599 | $this->vars[$key][$info] = $value; |
590 | 600 | } |
591 | 601 | |
602 | + /** |
|
603 | + * @param string $key |
|
604 | + */ |
|
592 | 605 | function getValueFor($key, $editor=true) { |
593 | 606 | global $xoopsModuleConfig; |
594 | 607 | |
@@ -759,7 +772,7 @@ discard block |
||
759 | 772 | * @access public |
760 | 773 | * @param string $key key of the object's variable to be returned |
761 | 774 | * @param string $format format to use for the output |
762 | - * @return mixed formatted value of the variable |
|
775 | + * @return string formatted value of the variable |
|
763 | 776 | */ |
764 | 777 | function getVar($key, $format = 's') |
765 | 778 | { |
@@ -1035,6 +1048,9 @@ discard block |
||
1035 | 1048 | } |
1036 | 1049 | } |
1037 | 1050 | |
1051 | + /** |
|
1052 | + * @param string $key |
|
1053 | + */ |
|
1038 | 1054 | function hideFieldFromForm($key) { |
1039 | 1055 | if (is_array($key)) { |
1040 | 1056 | foreach($key as $v) { |
@@ -111,6 +111,11 @@ discard block |
||
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
114 | + /** |
|
115 | + * @param integer $objectid |
|
116 | + * @param string $created_success_msg |
|
117 | + * @param string $modified_success_msg |
|
118 | + */ |
|
114 | 119 | function &doStoreFromDefaultForm(&$smartObj, $objectid, $created_success_msg, $modified_success_msg, $redirect_page=false, $debug=false) |
115 | 120 | { |
116 | 121 | global $smart_previous_page; |
@@ -193,10 +198,7 @@ discard block |
||
193 | 198 | * |
194 | 199 | * @param string $created_success_msg message to display if new object was created |
195 | 200 | * @param string $modified_success_msg message to display if object was successfully edited |
196 | - * @param string $created_redir_page redirect page after creating the object |
|
197 | - * @param string $modified_redir_page redirect page after editing the object |
|
198 | 201 | * @param string $redirect_page redirect page, if not set, then we backup once |
199 | - * @param bool $exit if set to TRUE then the script ends |
|
200 | 202 | * @return bool |
201 | 203 | */ |
202 | 204 | function &storeFromDefaultForm($created_success_msg, $modified_success_msg, $redirect_page=false, $debug=false, $x_param = false) |
@@ -261,8 +263,7 @@ discard block |
||
261 | 263 | /** |
262 | 264 | * Handles deletion of an object which keyid is passed as a GET param |
263 | 265 | * |
264 | - * @param string $redir_page redirect page after deleting the object |
|
265 | - * @return bool |
|
266 | + * @return boolean|null |
|
266 | 267 | */ |
267 | 268 | function handleObjectDeletion($confirm_msg = false, $op='del', $userSide=false) |
268 | 269 | { |
@@ -338,7 +339,7 @@ discard block |
||
338 | 339 | /** |
339 | 340 | * Retreive the object admin side link for a {@link SmartObjectSingleView} page |
340 | 341 | * |
341 | - * @param object $smartObj reference to the object from which we want the user side link |
|
342 | + * @param SmartObject $smartObj reference to the object from which we want the user side link |
|
342 | 343 | * @param bool $onlyUrl wether or not to return a simple URL or a full <a> link |
343 | 344 | * @return string admin side link to the object |
344 | 345 | */ |
@@ -358,7 +359,7 @@ discard block |
||
358 | 359 | /** |
359 | 360 | * Retreive the object user side link |
360 | 361 | * |
361 | - * @param object $smartObj reference to the object from which we want the user side link |
|
362 | + * @param SmartObject $smartObj reference to the object from which we want the user side link |
|
362 | 363 | * @param bool $onlyUrl wether or not to return a simple URL or a full <a> link |
363 | 364 | * @return string user side link to the object |
364 | 365 | */ |
@@ -391,6 +392,9 @@ discard block |
||
391 | 392 | return $ret; |
392 | 393 | } |
393 | 394 | |
395 | + /** |
|
396 | + * @param SmartMlObject $smartObj |
|
397 | + */ |
|
394 | 398 | function getEditLanguageLink($smartObj, $onlyUrl=false, $withimage=true) |
395 | 399 | { |
396 | 400 | $ret = $this->handler->_moduleUrl . "admin/" . $this->handler->_page . "?op=mod&" . $this->handler->keyName . "=" . $smartObj->getVar($this->handler->keyName) . "&language=" . $smartObj->getVar('language'); |
@@ -432,6 +436,9 @@ discard block |
||
432 | 436 | return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . "</a>"; |
433 | 437 | } |
434 | 438 | |
439 | + /** |
|
440 | + * @param SmartObject $smartObj |
|
441 | + */ |
|
435 | 442 | function getPrintAndMailLink($smartObj) { |
436 | 443 | global $xoopsConfig; |
437 | 444 |
@@ -136,12 +136,12 @@ discard block |
||
136 | 136 | * Constructor - called from child classes |
137 | 137 | * |
138 | 138 | * @param object $db {@link XoopsDatabase} object |
139 | - * @param string $tablename Name of the table use to store this {@link SmartObject} |
|
139 | + * @param string $itemname Name of the table use to store this {@link SmartObject} |
|
140 | 140 | * @param string Name of the class derived from {@link SmartObject} and which this handler is handling |
141 | 141 | * @param string $keyname Name of the table key that uniquely identify each {@link SmartObject} |
142 | 142 | * @param string $idenfierName Name of the field which properly identify the {@link SmartObject} |
143 | - * @param string $page Page name use to basically manage and display the {@link SmartObject} |
|
144 | - * @param string $moduleName name of the module |
|
143 | + * @param string $modulename name of the module |
|
144 | + * @param string $summaryName |
|
145 | 145 | */ |
146 | 146 | function SmartPersistableObjectHandler(&$db, $itemname, $keyname, $idenfierName, $summaryName, $modulename) { |
147 | 147 | |
@@ -184,6 +184,9 @@ discard block |
||
184 | 184 | ); |
185 | 185 | } |
186 | 186 | |
187 | + /** |
|
188 | + * @param boolean $perm_name |
|
189 | + */ |
|
187 | 190 | function setGrantedObjectsCriteria(&$criteria, $perm_name) { |
188 | 191 | $smartpermissions_handler = new SmartobjectPermissionHandler($this); |
189 | 192 | $grantedItems = $smartpermissions_handler->getGrantedItems($perm_name); |
@@ -335,6 +338,9 @@ discard block |
||
335 | 338 | return $this->convertResultSet($result, $id_as_key, $as_object); |
336 | 339 | } |
337 | 340 | |
341 | + /** |
|
342 | + * @param string $sql |
|
343 | + */ |
|
338 | 344 | function query($sql, $criteria, $force=false, $debug=false) |
339 | 345 | { |
340 | 346 | $ret = array(); |
@@ -848,7 +854,6 @@ discard block |
||
848 | 854 | * This method will check if the function is available |
849 | 855 | * |
850 | 856 | * @param string $event name of the event |
851 | - * @param object $obj $object on which is performed the event |
|
852 | 857 | * @return mixed result of the execution of the function or FALSE if the function was not executed |
853 | 858 | */ |
854 | 859 | function executeEvent($event, &$executeEventObj) { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | * @access public |
57 | 57 | * @param string $key key of the object's variable to be returned |
58 | 58 | * @param string $format format to use for the output |
59 | - * @return mixed formatted value of the variable |
|
59 | + * @return integer formatted value of the variable |
|
60 | 60 | */ |
61 | 61 | function getVar($key, $format = 's') { |
62 | 62 | if ($format == 's' && in_array($key, array('from_uid', 'to_uid', 'date', 'link'))) { |
@@ -126,7 +126,6 @@ |
||
126 | 126 | * saveCategory_Permissions() |
127 | 127 | * |
128 | 128 | * @param array $groups : group with granted permission |
129 | - * @param integer $categoryID : categoryID on which we are setting permissions for Categories and Forums |
|
130 | 129 | * @param string $perm_name : name of the permission |
131 | 130 | * @return boolean : TRUE if the no errors occured |
132 | 131 | **/ |
@@ -66,6 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Constructor |
69 | + * @param SmartObject $object |
|
69 | 70 | */ |
70 | 71 | function SmartObjectSingleView(&$object, $userSide=false, $actions=array(), $headerAsRow=true) |
71 | 72 | { |
@@ -75,6 +76,9 @@ discard block |
||
75 | 76 | $this->_headerAsRow = $headerAsRow; |
76 | 77 | } |
77 | 78 | |
79 | + /** |
|
80 | + * @param SmartObjectRow $rowObj |
|
81 | + */ |
|
78 | 82 | function addRow($rowObj) { |
79 | 83 | $this->_rows[] = $rowObj; |
80 | 84 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | /** |
21 | 21 | * Access the only instance of this class |
22 | 22 | * |
23 | - * @return object |
|
23 | + * @return SmartObjectsRegistry |
|
24 | 24 | * |
25 | 25 | * @static |
26 | 26 | * @staticvar object |