@@ -29,8 +29,6 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * @param string $name Identifier |
| 32 | - * @param string $title (Optional) Natural language title of the tabset |
|
| 33 | - * @param Tab|TabSet $unknown All further parameters are inserted as children into the TabSet |
|
| 34 | 32 | */ |
| 35 | 33 | public function __construct($name) { |
| 36 | 34 | $args = func_get_args(); |
@@ -148,8 +146,8 @@ discard block |
||
| 148 | 146 | /** |
| 149 | 147 | * Inserts a field before a particular field in a FieldList. |
| 150 | 148 | * |
| 151 | - * @param FormField $item The form field to insert |
|
| 152 | - * @param string $name Name of the field to insert before |
|
| 149 | + * @param TextField $field |
|
| 150 | + * @param string $insertBefore |
|
| 153 | 151 | */ |
| 154 | 152 | public function insertBefore($field, $insertBefore) { |
| 155 | 153 | parent::insertBefore($field, $insertBefore); |
@@ -157,6 +155,10 @@ discard block |
||
| 157 | 155 | $this->sequentialSet = null; |
| 158 | 156 | } |
| 159 | 157 | |
| 158 | + /** |
|
| 159 | + * @param TextField $field |
|
| 160 | + * @param string $insertAfter |
|
| 161 | + */ |
|
| 160 | 162 | public function insertAfter($field, $insertAfter) { |
| 161 | 163 | parent::insertAfter($field, $insertAfter); |
| 162 | 164 | if($field instanceof Tab) $field->setTabSet($this); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * |
| 76 | 76 | * @param string $name the field name |
| 77 | 77 | * @param string $title the field label |
| 78 | - * @param string|array $sourceObject The object-type to list in the tree. This could |
|
| 78 | + * @param string $sourceObject The object-type to list in the tree. This could |
|
| 79 | 79 | * be one of the following: |
| 80 | 80 | * - A DataObject class name with the {@link Hierarchy} extension. |
| 81 | 81 | * - An array of key/value pairs, like a {@link DropdownField} source. In |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | - * @return string |
|
| 206 | + * @return HTMLText |
|
| 207 | 207 | */ |
| 208 | 208 | public function Field($properties = array()) { |
| 209 | 209 | Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang'); |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | * If a filter function has been set, that will be called. And if search text is set, |
| 385 | 385 | * filter on that too. Return true if all applicable conditions are true, false otherwise. |
| 386 | 386 | * @param $node |
| 387 | - * @return unknown_type |
|
| 387 | + * @return boolean |
|
| 388 | 388 | */ |
| 389 | 389 | public function filterMarking($node) { |
| 390 | 390 | if ($this->filterCallback && !call_user_func($this->filterCallback, $node)) return false; |
@@ -435,7 +435,6 @@ discard block |
||
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | /** |
| 438 | - * @param String $field |
|
| 439 | 438 | */ |
| 440 | 439 | public function setSourceObject($class) { |
| 441 | 440 | $this->sourceObject = $class; |
@@ -194,7 +194,6 @@ discard block |
||
| 194 | 194 | * @param string $title The field label. |
| 195 | 195 | * @param SS_List $items If no items are defined, the field will try to auto-detect an existing relation on |
| 196 | 196 | * @link $record}, with the same name as the field name. |
| 197 | - * @param Form $form Reference to the container form |
|
| 198 | 197 | */ |
| 199 | 198 | public function __construct($name, $title = null, SS_List $items = null) { |
| 200 | 199 | |
@@ -600,7 +599,6 @@ discard block |
||
| 600 | 599 | * for each of these categories |
| 601 | 600 | * |
| 602 | 601 | * @param string $category Category name |
| 603 | - * @param string,... $categories Additional category names |
|
| 604 | 602 | * @return UploadField Self reference |
| 605 | 603 | */ |
| 606 | 604 | public function setAllowedFileCategories($category) { |
@@ -1086,7 +1084,7 @@ discard block |
||
| 1086 | 1084 | |
| 1087 | 1085 | /** |
| 1088 | 1086 | * @param SS_HTTPRequest $request |
| 1089 | - * @return UploadField_ItemHandler |
|
| 1087 | + * @return UploadField_SelectHandler |
|
| 1090 | 1088 | */ |
| 1091 | 1089 | public function handleSelect(SS_HTTPRequest $request) { |
| 1092 | 1090 | if(!$this->canAttachExisting()) return $this->httpError(403); |
@@ -1380,7 +1378,7 @@ discard block |
||
| 1380 | 1378 | |
| 1381 | 1379 | /** |
| 1382 | 1380 | * @param UploadFIeld $parent |
| 1383 | - * @param int $item |
|
| 1381 | + * @param int $itemID |
|
| 1384 | 1382 | */ |
| 1385 | 1383 | public function __construct($parent, $itemID) { |
| 1386 | 1384 | $this->parent = $parent; |
@@ -1449,7 +1447,7 @@ discard block |
||
| 1449 | 1447 | * Action to handle editing of a single file |
| 1450 | 1448 | * |
| 1451 | 1449 | * @param SS_HTTPRequest $request |
| 1452 | - * @return ViewableData_Customised |
|
| 1450 | + * @return HTMLText |
|
| 1453 | 1451 | */ |
| 1454 | 1452 | public function edit(SS_HTTPRequest $request) { |
| 1455 | 1453 | // Check form field state |
@@ -109,6 +109,7 @@ |
||
| 109 | 109 | * Used by FormField to return a value for FormField::Required(), to do things like show *s on the form template. |
| 110 | 110 | * |
| 111 | 111 | * By default, it always returns false. |
| 112 | + * @param string $fieldName |
|
| 112 | 113 | */ |
| 113 | 114 | public function fieldIsRequired($fieldName) { |
| 114 | 115 | return false; |
@@ -47,6 +47,7 @@ discard block |
||
| 47 | 47 | /** |
| 48 | 48 | * Clear the aggregate cache for a given type, or pass nothing to clear all aggregate caches. |
| 49 | 49 | * {@link $class} is just effective if the cache backend supports tags. |
| 50 | + * @param string $class |
|
| 50 | 51 | */ |
| 51 | 52 | public static function flushCache($class=null) { |
| 52 | 53 | $cache = self::cache(); |
@@ -92,7 +93,7 @@ discard block |
||
| 92 | 93 | * Build the SQLQuery to calculate the aggregate |
| 93 | 94 | * This is a seperate function so that subtypes of Aggregate can change just this bit |
| 94 | 95 | * @param string $attr - the SQL field statement for selection (i.e. "MAX(LastUpdated)") |
| 95 | - * @return SQLQuery |
|
| 96 | + * @return DataList |
|
| 96 | 97 | */ |
| 97 | 98 | protected function query($attr) { |
| 98 | 99 | $query = DataList::create($this->type)->where($this->filter); |
@@ -295,8 +295,8 @@ discard block |
||
| 295 | 295 | /** |
| 296 | 296 | * Find the first item of this list where the given key = value |
| 297 | 297 | * |
| 298 | - * @param type $key |
|
| 299 | - * @param type $value |
|
| 298 | + * @param string $key |
|
| 299 | + * @param string $value |
|
| 300 | 300 | * @return type |
| 301 | 301 | */ |
| 302 | 302 | public function find($key, $value) { |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | * |
| 388 | 388 | * Note that columns may be double quoted as per ANSI sql standard |
| 389 | 389 | * |
| 390 | - * @return DataList |
|
| 390 | + * @return ArrayList |
|
| 391 | 391 | * @see SS_List::sort() |
| 392 | 392 | * @example $list->sort('Name'); // default ASC sorting |
| 393 | 393 | * @example $list->sort('Name DESC'); // DESC sorting |
@@ -523,6 +523,9 @@ discard block |
||
| 523 | 523 | return $list; |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | + /** |
|
| 527 | + * @param integer $id |
|
| 528 | + */ |
|
| 526 | 529 | public function byID($id) { |
| 527 | 530 | $firstElement = $this->filter("ID", $id)->first(); |
| 528 | 531 | |
@@ -624,7 +627,6 @@ discard block |
||
| 624 | 627 | /** |
| 625 | 628 | * Returns whether an item with $key exists |
| 626 | 629 | * |
| 627 | - * @param mixed $key |
|
| 628 | 630 | * @return bool |
| 629 | 631 | */ |
| 630 | 632 | public function offsetExists($offset) { |
@@ -634,7 +636,6 @@ discard block |
||
| 634 | 636 | /** |
| 635 | 637 | * Returns item stored in list with index $key |
| 636 | 638 | * |
| 637 | - * @param mixed $key |
|
| 638 | 639 | * @return DataObject |
| 639 | 640 | */ |
| 640 | 641 | public function offsetGet($offset) { |
@@ -644,7 +645,6 @@ discard block |
||
| 644 | 645 | /** |
| 645 | 646 | * Set an item with the key in $key |
| 646 | 647 | * |
| 647 | - * @param mixed $key |
|
| 648 | 648 | * @param mixed $value |
| 649 | 649 | */ |
| 650 | 650 | public function offsetSet($offset, $value) { |
@@ -658,7 +658,6 @@ discard block |
||
| 658 | 658 | /** |
| 659 | 659 | * Unset an item with the key in $key |
| 660 | 660 | * |
| 661 | - * @param mixed $key |
|
| 662 | 661 | */ |
| 663 | 662 | public function offsetUnset($offset) { |
| 664 | 663 | unset($this->items[$offset]); |
@@ -145,6 +145,8 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * Returns the enum values available on the given field |
| 148 | + * @param string $tableName |
|
| 149 | + * @param string $fieldName |
|
| 148 | 150 | */ |
| 149 | 151 | abstract public function enumValuesForField($tableName, $fieldName); |
| 150 | 152 | |
@@ -255,6 +257,7 @@ discard block |
||
| 255 | 257 | /** |
| 256 | 258 | * @param string $table |
| 257 | 259 | * @param string $options |
| 260 | + * @param boolean $advanced_options |
|
| 258 | 261 | */ |
| 259 | 262 | public function transCreateTable($table, $options = null, $advanced_options = null) { |
| 260 | 263 | $this->schemaUpdateTransaction[$table] = array( |
@@ -269,6 +272,7 @@ discard block |
||
| 269 | 272 | /** |
| 270 | 273 | * @param string $table |
| 271 | 274 | * @param array $options |
| 275 | + * @param boolean $advanced_options |
|
| 272 | 276 | */ |
| 273 | 277 | public function transAlterTable($table, $options, $advanced_options) { |
| 274 | 278 | $this->transInitTable($table); |
@@ -276,18 +280,35 @@ discard block |
||
| 276 | 280 | $this->schemaUpdateTransaction[$table]['advancedOptions'] = $advanced_options; |
| 277 | 281 | } |
| 278 | 282 | |
| 283 | + /** |
|
| 284 | + * @param string $table |
|
| 285 | + * @param string $field |
|
| 286 | + */ |
|
| 279 | 287 | public function transCreateField($table, $field, $schema) { |
| 280 | 288 | $this->transInitTable($table); |
| 281 | 289 | $this->schemaUpdateTransaction[$table]['newFields'][$field] = $schema; |
| 282 | 290 | } |
| 291 | + |
|
| 292 | + /** |
|
| 293 | + * @param string $table |
|
| 294 | + */ |
|
| 283 | 295 | public function transCreateIndex($table, $index, $schema) { |
| 284 | 296 | $this->transInitTable($table); |
| 285 | 297 | $this->schemaUpdateTransaction[$table]['newIndexes'][$index] = $schema; |
| 286 | 298 | } |
| 299 | + |
|
| 300 | + /** |
|
| 301 | + * @param string $table |
|
| 302 | + * @param string $field |
|
| 303 | + */ |
|
| 287 | 304 | public function transAlterField($table, $field, $schema) { |
| 288 | 305 | $this->transInitTable($table); |
| 289 | 306 | $this->schemaUpdateTransaction[$table]['alteredFields'][$field] = $schema; |
| 290 | 307 | } |
| 308 | + |
|
| 309 | + /** |
|
| 310 | + * @param string $table |
|
| 311 | + */ |
|
| 291 | 312 | public function transAlterIndex($table, $index, $schema) { |
| 292 | 313 | $this->transInitTable($table); |
| 293 | 314 | $this->schemaUpdateTransaction[$table]['alteredIndexes'][$index] = $schema; |
@@ -319,7 +340,7 @@ discard block |
||
| 319 | 340 | * @param string $table The name of the table |
| 320 | 341 | * @param string $fieldSchema A list of the fields to create, in the same form as DataObject::$db |
| 321 | 342 | * @param string $indexSchema A list of indexes to create. See {@link requireIndex()} |
| 322 | - * @param array $options |
|
| 343 | + * @param string|null $options |
|
| 323 | 344 | */ |
| 324 | 345 | public function requireTable($table, $fieldSchema = null, $indexSchema = null, $hasAutoIncPK=true, |
| 325 | 346 | $options = Array(), $extensions=false) { |
@@ -786,6 +807,7 @@ discard block |
||
| 786 | 807 | * Returns the WHERE clauses ready for inserting into a query. |
| 787 | 808 | * Caution: Expects correctly quoted and escaped SQL fragments. |
| 788 | 809 | * |
| 810 | + * @param string $connective |
|
| 789 | 811 | * @return string |
| 790 | 812 | */ |
| 791 | 813 | public function sqlWhereToString($where, $connective) { |
@@ -944,6 +966,7 @@ discard block |
||
| 944 | 966 | * - minutes |
| 945 | 967 | * - seconds |
| 946 | 968 | * This includes the singular forms as well |
| 969 | + * @param string $date |
|
| 947 | 970 | * @return string SQL datetime expression to query for a datetime (YYYY-MM-DD hh:mm:ss) which is the result of |
| 948 | 971 | * the addition |
| 949 | 972 | */ |
@@ -956,6 +979,7 @@ discard block |
||
| 956 | 979 | * e.g. '"SiteTree"."Created"' |
| 957 | 980 | * @param string $date2 to be substracted of $date1, can be either 'now', literal datetime |
| 958 | 981 | * like '1973-10-14 10:30:00' or field name, e.g. '"SiteTree"."Created"' |
| 982 | + * @param string $date1 |
|
| 959 | 983 | * @return string SQL datetime expression to query for the interval between $date1 and $date2 in seconds which |
| 960 | 984 | * is the result of the substraction |
| 961 | 985 | */ |
@@ -986,6 +1010,10 @@ discard block |
||
| 986 | 1010 | /* |
| 987 | 1011 | * Create a savepoint that you can jump back to if you encounter problems |
| 988 | 1012 | */ |
| 1013 | + |
|
| 1014 | + /** |
|
| 1015 | + * @param string $savepoint |
|
| 1016 | + */ |
|
| 989 | 1017 | abstract public function transactionSavepoint($savepoint); |
| 990 | 1018 | |
| 991 | 1019 | /* |
@@ -1015,6 +1043,7 @@ discard block |
||
| 1015 | 1043 | * Returns if the lock is available. |
| 1016 | 1044 | * See {@link supportsLocks()} to check if locking is generally supported. |
| 1017 | 1045 | * |
| 1046 | + * @param string $name |
|
| 1018 | 1047 | * @return Boolean |
| 1019 | 1048 | */ |
| 1020 | 1049 | public function canLock($name) { |
@@ -1036,6 +1065,7 @@ discard block |
||
| 1036 | 1065 | * |
| 1037 | 1066 | * @param String |
| 1038 | 1067 | * @param Int Timeout in seconds |
| 1068 | + * @param string $name |
|
| 1039 | 1069 | * @return Boolean |
| 1040 | 1070 | */ |
| 1041 | 1071 | public function getLock($name, $timeout = 5) { |
@@ -1047,6 +1077,7 @@ discard block |
||
| 1047 | 1077 | * (if the execution aborts (e.g. due to an error) all locks are automatically released). |
| 1048 | 1078 | * |
| 1049 | 1079 | * @param String |
| 1080 | + * @param string $name |
|
| 1050 | 1081 | * @return Boolean |
| 1051 | 1082 | */ |
| 1052 | 1083 | public function releaseLock($name) { |
@@ -46,7 +46,8 @@ |
||
| 46 | 46 | * If $fromRecord is null, this will represent a "creation". |
| 47 | 47 | * |
| 48 | 48 | * @param DataObject (Optional) |
| 49 | - * @param DataObject |
|
| 49 | + * @param DataObject |
|
| 50 | + * @param DataObject|null $fromRecord |
|
| 50 | 51 | */ |
| 51 | 52 | public function __construct($fromRecord, DataObject $toRecord) { |
| 52 | 53 | if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING); |
@@ -153,6 +153,9 @@ discard block |
||
| 153 | 153 | return $clone; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | + /** |
|
| 157 | + * @param string $val |
|
| 158 | + */ |
|
| 156 | 159 | public function setDataQueryParam($keyOrArray, $val = null) { |
| 157 | 160 | $clone = clone $this; |
| 158 | 161 | |
@@ -171,7 +174,7 @@ discard block |
||
| 171 | 174 | /** |
| 172 | 175 | * Returns the SQL query that will be used to get this DataList's records. Good for debugging. :-) |
| 173 | 176 | * |
| 174 | - * @return SQLQuery |
|
| 177 | + * @return string |
|
| 175 | 178 | */ |
| 176 | 179 | public function sql() { |
| 177 | 180 | return $this->dataQuery->query()->sql(); |
@@ -716,7 +719,7 @@ discard block |
||
| 716 | 719 | * Return the maximum value of the given field in this DataList |
| 717 | 720 | * |
| 718 | 721 | * @param string $fieldName |
| 719 | - * @return mixed |
|
| 722 | + * @return string |
|
| 720 | 723 | */ |
| 721 | 724 | public function max($fieldName) { |
| 722 | 725 | return $this->dataQuery->max($fieldName); |
@@ -726,7 +729,7 @@ discard block |
||
| 726 | 729 | * Return the minimum value of the given field in this DataList |
| 727 | 730 | * |
| 728 | 731 | * @param string $fieldName |
| 729 | - * @return mixed |
|
| 732 | + * @return string |
|
| 730 | 733 | */ |
| 731 | 734 | public function min($fieldName) { |
| 732 | 735 | return $this->dataQuery->min($fieldName); |
@@ -736,7 +739,7 @@ discard block |
||
| 736 | 739 | * Return the average value of the given field in this DataList |
| 737 | 740 | * |
| 738 | 741 | * @param string $fieldName |
| 739 | - * @return mixed |
|
| 742 | + * @return string |
|
| 740 | 743 | */ |
| 741 | 744 | public function avg($fieldName) { |
| 742 | 745 | return $this->dataQuery->avg($fieldName); |
@@ -746,7 +749,7 @@ discard block |
||
| 746 | 749 | * Return the sum of the values of the given field in this DataList |
| 747 | 750 | * |
| 748 | 751 | * @param string $fieldName |
| 749 | - * @return mixed |
|
| 752 | + * @return string |
|
| 750 | 753 | */ |
| 751 | 754 | public function sum($fieldName) { |
| 752 | 755 | return $this->dataQuery->sum($fieldName); |
@@ -817,7 +820,7 @@ discard block |
||
| 817 | 820 | /** |
| 818 | 821 | * Restrict the columns to fetch into this DataList |
| 819 | 822 | * |
| 820 | - * @param array $queriedColumns |
|
| 823 | + * @param string[] $queriedColumns |
|
| 821 | 824 | * @return DataList |
| 822 | 825 | */ |
| 823 | 826 | public function setQueriedColumns($queriedColumns) { |
@@ -1093,7 +1096,7 @@ discard block |
||
| 1093 | 1096 | /** |
| 1094 | 1097 | * Returns item stored in list with index $key |
| 1095 | 1098 | * |
| 1096 | - * @param mixed $key |
|
| 1099 | + * @param integer $key |
|
| 1097 | 1100 | * @return DataObject |
| 1098 | 1101 | */ |
| 1099 | 1102 | public function offsetGet($key) { |