@@ -386,6 +386,9 @@ discard block |
||
386 | 386 | else return ''; |
387 | 387 | } |
388 | 388 | |
389 | + /** |
|
390 | + * @param string $optional_array |
|
391 | + */ |
|
389 | 392 | function _add_optional_where_clause($optional_array, $add_and='',$prefix='') { |
390 | 393 | |
391 | 394 | if (!empty($prefix)) $prefix.='.'; |
@@ -612,6 +615,9 @@ discard block |
||
612 | 615 | return $this->_bean->build_related_list($query, $template); |
613 | 616 | } |
614 | 617 | |
618 | + /** |
|
619 | + * @param boolean $bean_is_lhs |
|
620 | + */ |
|
615 | 621 | function _add_one_to_many_table_based($key,$bean_is_lhs) { |
616 | 622 | |
617 | 623 | if ($bean_is_lhs) { |
@@ -825,6 +831,9 @@ discard block |
||
825 | 831 | $result=$this->_db->query($query, true); |
826 | 832 | } |
827 | 833 | |
834 | + /** |
|
835 | + * @param string $where |
|
836 | + */ |
|
828 | 837 | function _update_row(&$value_array,$table_name,$where) { |
829 | 838 | |
830 | 839 | $query='UPDATE '.$table_name.' SET '; |
@@ -1053,6 +1062,10 @@ discard block |
||
1053 | 1062 | |
1054 | 1063 | /* |
1055 | 1064 | */ |
1065 | + |
|
1066 | + /** |
|
1067 | + * @param string $def_name |
|
1068 | + */ |
|
1056 | 1069 | function _get_link_table_definition($table_name,$def_name) { |
1057 | 1070 | global $dictionary; |
1058 | 1071 | |
@@ -1096,6 +1109,10 @@ discard block |
||
1096 | 1109 | * Return the name of the role field for the passed many to many table. |
1097 | 1110 | * if there is no role filed : return false |
1098 | 1111 | */ |
1112 | + |
|
1113 | + /** |
|
1114 | + * @return string |
|
1115 | + */ |
|
1099 | 1116 | function _get_link_table_role_field($table_name) { |
1100 | 1117 | $varDefs = $this->_get_link_table_definition($table_name, 'fields'); |
1101 | 1118 | $role_field = false; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @param $linkName String name of a link field in the module's vardefs |
75 | 75 | * @param $bean SugarBean focus bean for this link (one half of a relationship) |
76 | 76 | * @param $linkDef Array Optional vardef for the link in case it can't be found in the passed in bean for the global dictionary |
77 | - * @return void |
|
77 | + * @return false|null |
|
78 | 78 | * |
79 | 79 | */ |
80 | 80 | function __construct($linkName, $bean, $linkDef = false){ |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | /** |
357 | 357 | * @param array $params optional parameters. Possible Values; |
358 | 358 | * 'return_as_array': returns the query broken into |
359 | - * @return String/Array query to grab just ids for this relationship |
|
359 | + * @return string query to grab just ids for this relationship |
|
360 | 360 | */ |
361 | 361 | function getQuery($params = array()) |
362 | 362 | { |
@@ -686,6 +686,7 @@ discard block |
||
686 | 686 | /** |
687 | 687 | * @deprecated |
688 | 688 | * Gets the vardef for the relationship of this link. |
689 | + * @param string $def_name |
|
689 | 690 | */ |
690 | 691 | public function _get_link_table_definition($table_name, $def_name) { |
691 | 692 |
@@ -365,8 +365,8 @@ discard block |
||
365 | 365 | |
366 | 366 | /** |
367 | 367 | * Removes the reversed version of this relationship |
368 | - * @param $lhs |
|
369 | - * @param $rhs |
|
368 | + * @param SugarBean $lhs |
|
369 | + * @param SugarBean $rhs |
|
370 | 370 | * @param array $additionalFields |
371 | 371 | * @return void |
372 | 372 | */ |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | } |
384 | 384 | |
385 | 385 | /** |
386 | - * @param $link Link2 loads the relationship for this link. |
|
386 | + * @param Link2 $link Link2 loads the relationship for this link. |
|
387 | 387 | * @return void |
388 | 388 | */ |
389 | 389 | public function load($link, $params = array()) |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | /** |
533 | 533 | * Similar to getQuery or Get join, except this time we are starting from the related table and |
534 | 534 | * searching for items with id's matching the $link->focus->id |
535 | - * @param $link |
|
535 | + * @param Link2 $link |
|
536 | 536 | * @param array $params |
537 | 537 | * @param bool $return_array |
538 | 538 | * @return String|Array |
@@ -119,7 +119,7 @@ |
||
119 | 119 | * @param $lhs SugarBean left side bean to add to the relationship. |
120 | 120 | * @param $rhs SugarBean right side bean to add to the relationship. |
121 | 121 | * @param $additionalFields key=>value pairs of fields to save on the relationship |
122 | - * @return boolean true if successful |
|
122 | + * @return boolean|null true if successful |
|
123 | 123 | */ |
124 | 124 | public function add($lhs, $rhs, $additionalFields = array()) |
125 | 125 | { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | /** |
199 | 199 | * @param array $row values to be inserted into the relationship |
200 | - * @return bool|void null if new row was inserted and true if an existing row was updated |
|
200 | + * @return resource|null null if new row was inserted and true if an existing row was updated |
|
201 | 201 | */ |
202 | 202 | protected function addRow($row) |
203 | 203 | { |
@@ -399,8 +399,6 @@ discard block |
||
399 | 399 | |
400 | 400 | /** |
401 | 401 | * @param $optional_array clause to add to the where query when populating this relationship. It should be in the |
402 | - * @param string $add_and |
|
403 | - * @param string $prefix |
|
404 | 402 | * @return string |
405 | 403 | */ |
406 | 404 | protected function getOptionalWhereClause($optional_array) { |
@@ -394,8 +394,7 @@ discard block |
||
394 | 394 | * |
395 | 395 | * All implementing classes must set a value for the object_name variable. |
396 | 396 | * |
397 | - * @param array $arr row of data fetched from the database. |
|
398 | - * @return nothing |
|
397 | + * @return string |
|
399 | 398 | * |
400 | 399 | */ |
401 | 400 | function getObjectName() |
@@ -1036,7 +1035,6 @@ discard block |
||
1036 | 1035 | * Method will load the relationship if not done so already. |
1037 | 1036 | * |
1038 | 1037 | * @param string $field_name relationship to be loaded. |
1039 | - * @param string $bean name class name of the related bean.legacy |
|
1040 | 1038 | * @param string $order_by, Optional, default empty. |
1041 | 1039 | * @param int $begin_index Optional, default 0, unused. |
1042 | 1040 | * @param int $end_index Optional, default -1 |
@@ -2279,7 +2277,7 @@ discard block |
||
2279 | 2277 | * The fetched data is then set into the bean. The function also processes the fetched data by formattig |
2280 | 2278 | * date/time and numeric values. |
2281 | 2279 | * |
2282 | - * @param string $id Optional, default -1, is set to -1 id value from the bean is used, else, passed value is used |
|
2280 | + * @param integer $id Optional, default -1, is set to -1 id value from the bean is used, else, passed value is used |
|
2283 | 2281 | * @param boolean $encode Optional, default true, encodes the values fetched from the database. |
2284 | 2282 | * @param boolean $deleted Optional, default true, if set to false deleted filter will not be added. |
2285 | 2283 | * |
@@ -2502,9 +2500,9 @@ discard block |
||
2502 | 2500 | * @param string $order_by |
2503 | 2501 | * @param string $where Additional where clause |
2504 | 2502 | * @param int $row_offset Optaional,default 0, starting row number |
2505 | - * @param init $limit Optional, default -1 |
|
2503 | + * @param integer $limit Optional, default -1 |
|
2506 | 2504 | * @param int $max Optional, default -1 |
2507 | - * @param boolean $show_deleted Optional, default 0, if set to 1 system will show deleted records. |
|
2505 | + * @param integer $show_deleted Optional, default 0, if set to 1 system will show deleted records. |
|
2508 | 2506 | * @return array Fetched data. |
2509 | 2507 | * |
2510 | 2508 | * Internal function, do not override. |
@@ -2629,9 +2627,9 @@ discard block |
||
2629 | 2627 | * @param string $order_by |
2630 | 2628 | * @param string $where Additional where clause |
2631 | 2629 | * @param int $row_offset Optaional,default 0, starting row number |
2632 | - * @param init $limit Optional, default -1 |
|
2630 | + * @param integer $limit Optional, default -1 |
|
2633 | 2631 | * @param int $max Optional, default -1 |
2634 | - * @param boolean $show_deleted Optioanl, default 0, if set to 1 system will show deleted records. |
|
2632 | + * @param integer $show_deleted Optioanl, default 0, if set to 1 system will show deleted records. |
|
2635 | 2633 | * @return array Fetched data. |
2636 | 2634 | * |
2637 | 2635 | * Internal function, do not override. |
@@ -2756,6 +2754,11 @@ discard block |
||
2756 | 2754 | } |
2757 | 2755 | |
2758 | 2756 | |
2757 | + /** |
|
2758 | + * @param aSubPanel $subpanel_def |
|
2759 | + * @param SugarBean $parentbean |
|
2760 | + * @param string $order_by |
|
2761 | + */ |
|
2759 | 2762 | protected static function build_sub_queries_for_union($subpanel_list, $subpanel_def, $parentbean, $order_by) |
2760 | 2763 | { |
2761 | 2764 | global $layout_edit_mode, $beanFiles, $beanList; |
@@ -3928,15 +3931,15 @@ discard block |
||
3928 | 3931 | * executes the query and returns fetched data. |
3929 | 3932 | * |
3930 | 3933 | * Internal function, do not override. |
3931 | - * @param object $parent_bean |
|
3934 | + * @param SugarBean $parent_bean |
|
3932 | 3935 | * @param string $query query to be processed. |
3933 | 3936 | * @param int $row_offset |
3934 | 3937 | * @param int $limit optional, default -1 |
3935 | 3938 | * @param int $max_per_page Optional, default -1 |
3936 | 3939 | * @param string $where Custom where clause. |
3937 | - * @param array $subpanel_def definition of sub-panel to be processed |
|
3940 | + * @param aSubPanel $subpanel_def definition of sub-panel to be processed |
|
3938 | 3941 | * @param string $query_row_count |
3939 | - * @param array $seconday_queries |
|
3942 | + * @param array $secondary_queries |
|
3940 | 3943 | * @return array Fetched data. |
3941 | 3944 | */ |
3942 | 3945 | function process_union_list_query($parent_bean, $query, |
@@ -4577,6 +4580,7 @@ discard block |
||
4577 | 4580 | * Restores data deleted by call to mark_deleted() function. |
4578 | 4581 | * |
4579 | 4582 | * Internal function, do not override. |
4583 | + * @param string $id |
|
4580 | 4584 | */ |
4581 | 4585 | function mark_undeleted($id) |
4582 | 4586 | { |
@@ -4609,7 +4613,7 @@ discard block |
||
4609 | 4613 | /** |
4610 | 4614 | * Returns path for files of bean or false on error |
4611 | 4615 | * |
4612 | - * @return bool|string |
|
4616 | + * @return false|string |
|
4613 | 4617 | */ |
4614 | 4618 | public function deleteFileDirectory() |
4615 | 4619 | { |
@@ -4941,8 +4945,8 @@ discard block |
||
4941 | 4945 | * Internal function, do not override. |
4942 | 4946 | * |
4943 | 4947 | * @param string $query - the query that should be executed to build the list |
4944 | - * @param object $template - The object that should be used to copy the records |
|
4945 | - * @param array $field_list List of fields. |
|
4948 | + * @param Contact $template - The object that should be used to copy the records |
|
4949 | + * @param string[] $field_list List of fields. |
|
4946 | 4950 | * @return array |
4947 | 4951 | */ |
4948 | 4952 | function build_related_list2($query, &$template, &$field_list) |
@@ -5088,7 +5092,7 @@ discard block |
||
5088 | 5092 | * @param array @fields_array array of name value pairs used to construct query. |
5089 | 5093 | * @param boolean $encode Optional, default true, encode fetched data. |
5090 | 5094 | * @param boolean $deleted Optional, default true, if set to false deleted filter will not be added. |
5091 | - * @return object Instance of this bean with fetched data. |
|
5095 | + * @return null|SugarBean Instance of this bean with fetched data. |
|
5092 | 5096 | */ |
5093 | 5097 | function retrieve_by_string_fields($fields_array, $encode=true, $deleted=true) |
5094 | 5098 | { |
@@ -5259,6 +5263,9 @@ discard block |
||
5259 | 5263 | * RELATIONSHIP HANDLING |
5260 | 5264 | */ |
5261 | 5265 | |
5266 | + /** |
|
5267 | + * @param string $table |
|
5268 | + */ |
|
5262 | 5269 | function set_relationship($table, $relate_values, $check_duplicates = true,$do_update=false,$data_values=null) |
5263 | 5270 | { |
5264 | 5271 | $where = ''; |
@@ -5364,6 +5371,7 @@ discard block |
||
5364 | 5371 | * $bean - $this bean passed in by reference. |
5365 | 5372 | * $event - The string for the current event (i.e. before_save) |
5366 | 5373 | * $arguments - An array of arguments that are specific to the event. |
5374 | + * @param string $event |
|
5367 | 5375 | */ |
5368 | 5376 | function call_custom_logic($event, $arguments = null) |
5369 | 5377 | { |
@@ -5765,7 +5773,7 @@ discard block |
||
5765 | 5773 | * |
5766 | 5774 | * @param string $order_by original order by from the query |
5767 | 5775 | * @param string $qualify prefix for columns in the order by list. |
5768 | - * @return prefixed |
|
5776 | + * @return string |
|
5769 | 5777 | * |
5770 | 5778 | * Internal function do not override. |
5771 | 5779 | */ |
@@ -5851,6 +5859,7 @@ discard block |
||
5851 | 5859 | /** |
5852 | 5860 | * Moved from save() method, functionality is the same, but this is intended to handle |
5853 | 5861 | * Optimistic locking functionality. |
5862 | + * @param boolean $isUpdate |
|
5854 | 5863 | */ |
5855 | 5864 | private function _checkOptimisticLocking($action, $isUpdate){ |
5856 | 5865 | if($this->optimistic_lock && !isset($_SESSION['o_lock_fs'])){ |
@@ -5891,6 +5900,7 @@ discard block |
||
5891 | 5900 | |
5892 | 5901 | /** |
5893 | 5902 | * Send assignment notifications and invites for meetings and calls |
5903 | + * @param boolean $check_notify |
|
5894 | 5904 | */ |
5895 | 5905 | private function _sendNotifications($check_notify){ |
5896 | 5906 | if($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true) // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true. |
@@ -5961,9 +5971,9 @@ discard block |
||
5961 | 5971 | * bean files and have since been moved to separate files. Was previously in include/CacheHandler.php |
5962 | 5972 | * |
5963 | 5973 | * @deprecated |
5964 | - * @param $module_dir string the module directory |
|
5965 | - * @param $module string the name of the module |
|
5966 | - * @param $key string the type of field array we are referencing, i.e. list_fields, column_fields, required_fields |
|
5974 | + * @param string $module_dir string the module directory |
|
5975 | + * @param string $module string the name of the module |
|
5976 | + * @param string $key string the type of field array we are referencing, i.e. list_fields, column_fields, required_fields |
|
5967 | 5977 | **/ |
5968 | 5978 | private function _loadCachedArray( |
5969 | 5979 | $module_dir, |
@@ -342,6 +342,9 @@ |
||
342 | 342 | return $this->_source; |
343 | 343 | } |
344 | 344 | |
345 | + /** |
|
346 | + * @param source $source |
|
347 | + */ |
|
345 | 348 | public function setSource($source){ |
346 | 349 | $this->_source = $source; |
347 | 350 | } |
@@ -63,6 +63,7 @@ |
||
63 | 63 | * Split the class name by _ and go through the class name |
64 | 64 | * which represents the inheritance structure to load up all required parents. |
65 | 65 | * @param string $class the root class we want to load. |
66 | + * @param string $type |
|
66 | 67 | */ |
67 | 68 | public static function load($class, $type){ |
68 | 69 | self::loadClass($class, $type); |
@@ -47,6 +47,9 @@ |
||
47 | 47 | |
48 | 48 | static $filter_map = array(); |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $source_name |
|
52 | + */ |
|
50 | 53 | public static function getInstance($source_name, $filter_name=''){ |
51 | 54 | require_once('include/connectors/filters/default/filter.php'); |
52 | 55 | $key = $source_name . $filter_name; |