@@ -91,6 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Handle the export, for both the action button and the URL |
94 | + * @param GridField $gridField |
|
94 | 95 | */ |
95 | 96 | public function handleExport($gridField, $request = null) { |
96 | 97 | $now = Date("d-m-Y-H-i"); |
@@ -248,6 +249,7 @@ discard block |
||
248 | 249 | |
249 | 250 | /** |
250 | 251 | * @param boolean |
252 | + * @param boolean $bool |
|
251 | 253 | */ |
252 | 254 | public function setCsvHasHeader($bool) { |
253 | 255 | $this->csvHasHeader = $bool; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * left. |
87 | 87 | * @param array $attributes an array of attributes to include on the link. |
88 | 88 | * |
89 | - * @return boolean The result of the operation. |
|
89 | + * @return boolean|null The result of the operation. |
|
90 | 90 | */ |
91 | 91 | public static function add_link($code, $menuTitle, $url, $priority = -1, $attributes = null) { |
92 | 92 | return self::add_menu_item($code, $menuTitle, $url, null, $priority, $attributes); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @param int $priority |
108 | 108 | * @param array $attributes an array of attributes to include on the link. |
109 | 109 | * |
110 | - * @return boolean Success |
|
110 | + * @return boolean|null Success |
|
111 | 111 | */ |
112 | 112 | public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
113 | 113 | $attributes = null) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * @param int $priority |
240 | 240 | * @param array $attributes an array of attributes to include on the link. |
241 | 241 | * |
242 | - * @return boolean Success |
|
242 | + * @return boolean|null Success |
|
243 | 243 | */ |
244 | 244 | public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
245 | 245 | $attributes = null) { |
@@ -258,6 +258,8 @@ discard block |
||
258 | 258 | |
259 | 259 | /** |
260 | 260 | * Add a previously built menu item object to the menu |
261 | + * @param string $code |
|
262 | + * @param CMSMenuItem $cmsMenuItem |
|
261 | 263 | */ |
262 | 264 | protected static function add_menu_item_obj($code, $cmsMenuItem) { |
263 | 265 | self::$menu_item_changes[] = array( |
@@ -120,6 +120,9 @@ discard block |
||
120 | 120 | Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ModelAdmin.js'); |
121 | 121 | } |
122 | 122 | |
123 | + /** |
|
124 | + * @param string $action |
|
125 | + */ |
|
123 | 126 | public function Link($action = null) { |
124 | 127 | if(!$action) $action = $this->sanitiseClassName($this->modelClass); |
125 | 128 | return parent::Link($action); |
@@ -274,6 +277,7 @@ discard block |
||
274 | 277 | |
275 | 278 | /** |
276 | 279 | * Unsanitise a model class' name from a URL param |
280 | + * @param string $class |
|
277 | 281 | * @return string |
278 | 282 | */ |
279 | 283 | protected function unsanitiseClassName($class) { |
@@ -414,7 +418,7 @@ discard block |
||
414 | 418 | * @param array $data |
415 | 419 | * @param Form $form |
416 | 420 | * @param SS_HTTPRequest $request |
417 | - * @return bool|null |
|
421 | + * @return false|null |
|
418 | 422 | */ |
419 | 423 | public function import($data, $form, $request) { |
420 | 424 | if(!$this->showImportForm || (is_array($this->showImportForm) |
@@ -470,11 +470,17 @@ discard block |
||
470 | 470 | |
471 | 471 | protected $extraConfigSources = array(); |
472 | 472 | |
473 | + /** |
|
474 | + * @param string $class |
|
475 | + */ |
|
473 | 476 | public function extraConfigSourcesChanged($class) { |
474 | 477 | unset($this->extraConfigSources[$class]); |
475 | 478 | $this->cache->clean("__{$class}"); |
476 | 479 | } |
477 | 480 | |
481 | + /** |
|
482 | + * @param integer $sourceOptions |
|
483 | + */ |
|
478 | 484 | protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) { |
479 | 485 | $tags[] = "__{$class}"; |
480 | 486 | $tags[] = "__{$class}__{$name}"; |
@@ -604,7 +610,7 @@ discard block |
||
604 | 610 | * |
605 | 611 | * @param string $class The class to update a configuration value for |
606 | 612 | * @param string $name The configuration property name to update |
607 | - * @param mixed $value The value to update with |
|
613 | + * @param mixed $val The value to update with |
|
608 | 614 | * |
609 | 615 | * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value |
610 | 616 | * replaces any item with the same key, for sequential arrays the items are placed at the end of the array, for |
@@ -728,6 +734,10 @@ discard block |
||
728 | 734 | $this->cache = $cloned; |
729 | 735 | } |
730 | 736 | |
737 | + /** |
|
738 | + * @param integer $key |
|
739 | + * @param integer $val |
|
740 | + */ |
|
731 | 741 | public function set($key, $val, $tags = array()) { |
732 | 742 | // Find an index to set at |
733 | 743 | $replacing = null; |
@@ -796,6 +806,9 @@ discard block |
||
796 | 806 | } |
797 | 807 | } |
798 | 808 | |
809 | + /** |
|
810 | + * @param string $tag |
|
811 | + */ |
|
799 | 812 | public function clean($tag = null) { |
800 | 813 | if ($tag) { |
801 | 814 | foreach ($this->cache as $i => $v) { |
@@ -827,6 +840,10 @@ discard block |
||
827 | 840 | $this->cache = array(); |
828 | 841 | } |
829 | 842 | |
843 | + /** |
|
844 | + * @param integer $key |
|
845 | + * @param integer $val |
|
846 | + */ |
|
830 | 847 | public function set($key, $val, $tags = array()) { |
831 | 848 | foreach($tags as $t) { |
832 | 849 | if(!isset($this->tags[$t])) { |
@@ -845,6 +862,9 @@ discard block |
||
845 | 862 | return $this->miss ? ($this->hit / $this->miss) : 0; |
846 | 863 | } |
847 | 864 | |
865 | + /** |
|
866 | + * @param integer $key |
|
867 | + */ |
|
848 | 868 | public function get($key) { |
849 | 869 | list($hit, $result) = $this->checkAndGet($key); |
850 | 870 | return $hit ? $result : false; |
@@ -864,6 +884,9 @@ discard block |
||
864 | 884 | } |
865 | 885 | } |
866 | 886 | |
887 | + /** |
|
888 | + * @param string $tag |
|
889 | + */ |
|
867 | 890 | public function clean($tag = null) { |
868 | 891 | if($tag) { |
869 | 892 | if(isset($this->tags[$tag])) { |
@@ -125,8 +125,6 @@ discard block |
||
125 | 125 | * $list = DataList::create('SiteTree'); |
126 | 126 | * $list = SiteTree::get(); |
127 | 127 | * |
128 | - * @param string $class the class name |
|
129 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
130 | 128 | * @return static |
131 | 129 | */ |
132 | 130 | public static function create() { |
@@ -149,7 +147,6 @@ discard block |
||
149 | 147 | * way to access instance methods which don't rely on instance |
150 | 148 | * data (e.g. the custom SilverStripe static handling). |
151 | 149 | * |
152 | - * @param string $className Optional classname (if called on Object directly) |
|
153 | 150 | * @return static The singleton instance |
154 | 151 | */ |
155 | 152 | public static function singleton() { |
@@ -334,8 +331,6 @@ discard block |
||
334 | 331 | * Similar to {@link Object::create()}, except that classes are only overloaded if you set the $strong parameter to |
335 | 332 | * TRUE when using {@link Object::useCustomClass()} |
336 | 333 | * |
337 | - * @param string $class the class name |
|
338 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
339 | 334 | * @return static |
340 | 335 | */ |
341 | 336 | public static function strong_create() { |
@@ -387,8 +382,8 @@ discard block |
||
387 | 382 | * without any inheritance, merging or parent lookup if it doesn't exist on the given class. |
388 | 383 | * |
389 | 384 | * @static |
390 | - * @param $class - The class to get the static from |
|
391 | - * @param $name - The property to get from the class |
|
385 | + * @param string $class - The class to get the static from |
|
386 | + * @param string $name - The property to get from the class |
|
392 | 387 | * @param null $default - The value to return if property doesn't exist on class |
393 | 388 | * @return any - The value of the static property $name on class $class, or $default if that property is not |
394 | 389 | * defined |
@@ -958,6 +953,7 @@ discard block |
||
958 | 953 | |
959 | 954 | /** |
960 | 955 | * @see Object::get_static() |
956 | + * @param string $name |
|
961 | 957 | */ |
962 | 958 | public function stat($name, $uncached = false) { |
963 | 959 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::FIRST_SET); |
@@ -965,6 +961,8 @@ discard block |
||
965 | 961 | |
966 | 962 | /** |
967 | 963 | * @see Object::set_static() |
964 | + * @param string $name |
|
965 | + * @param string $value |
|
968 | 966 | */ |
969 | 967 | public function set_stat($name, $value) { |
970 | 968 | Config::inst()->update(($this->class ? $this->class : get_class($this)), $name, $value); |
@@ -972,6 +970,7 @@ discard block |
||
972 | 970 | |
973 | 971 | /** |
974 | 972 | * @see Object::uninherited_static() |
973 | + * @param string $name |
|
975 | 974 | */ |
976 | 975 | public function uninherited($name) { |
977 | 976 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::UNINHERITED); |
@@ -1022,7 +1021,7 @@ discard block |
||
1022 | 1021 | * all results into an array |
1023 | 1022 | * |
1024 | 1023 | * @param string $method the method name to call |
1025 | - * @param mixed $argument a single argument to pass |
|
1024 | + * @param string $argument a single argument to pass |
|
1026 | 1025 | * @return mixed |
1027 | 1026 | * @todo integrate inheritance rules |
1028 | 1027 | */ |
@@ -1048,7 +1047,7 @@ discard block |
||
1048 | 1047 | * @param mixed $a1 |
1049 | 1048 | * @param mixed $a2 |
1050 | 1049 | * @param mixed $a3 |
1051 | - * @param mixed $a4 |
|
1050 | + * @param DataObject $a4 |
|
1052 | 1051 | * @param mixed $a5 |
1053 | 1052 | * @param mixed $a6 |
1054 | 1053 | * @param mixed $a7 |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @param string $tabName The name of the tab or tabset. Subtabs can be referred to as TabSet.Tab |
134 | 134 | * or TabSet.Tab.Subtab. This function will create any missing tabs. |
135 | 135 | * @param array $fields An array of {@link FormField} objects. |
136 | - * @param string $name Name of the field to insert before (optional) |
|
136 | + * @param string $insertBefore |
|
137 | 137 | */ |
138 | 138 | public function addFieldsToTab($tabName, $fields, $insertBefore = null) { |
139 | 139 | $this->flushFieldsCache(); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * Removes a number of fields from a Tab/TabSet within this FieldList. |
174 | 174 | * |
175 | 175 | * @param string $tabName The name of the Tab or TabSet field |
176 | - * @param array $fields A list of fields, e.g. array('Name', 'Email') |
|
176 | + * @param string[] $fields A list of fields, e.g. array('Name', 'Email') |
|
177 | 177 | */ |
178 | 178 | public function removeFieldsFromTab($tabName, $fields) { |
179 | 179 | $this->flushFieldsCache(); |
@@ -453,6 +453,7 @@ discard block |
||
453 | 453 | |
454 | 454 | /** |
455 | 455 | * Handler method called before the FieldList is going to be manipulated. |
456 | + * @param FormField $item |
|
456 | 457 | */ |
457 | 458 | protected function onBeforeInsert($item) { |
458 | 459 | $this->flushFieldsCache(); |
@@ -525,6 +526,7 @@ discard block |
||
525 | 526 | * Transform this FieldList with a given tranform method, |
526 | 527 | * e.g. $this->transform(new ReadonlyTransformation()) |
527 | 528 | * |
529 | + * @param ReadonlyTransformation $trans |
|
528 | 530 | * @return FieldList |
529 | 531 | */ |
530 | 532 | public function transform($trans) { |
@@ -544,6 +546,9 @@ discard block |
||
544 | 546 | else return $this; |
545 | 547 | } |
546 | 548 | |
549 | + /** |
|
550 | + * @param CompositeField $field |
|
551 | + */ |
|
547 | 552 | public function setContainerField($field) { |
548 | 553 | $this->containerField = $field; |
549 | 554 | return $this; |
@@ -562,6 +567,7 @@ discard block |
||
562 | 567 | * Transform the named field into a readonly feld. |
563 | 568 | * |
564 | 569 | * @param string|FormField |
570 | + * @param string $field |
|
565 | 571 | */ |
566 | 572 | public function makeFieldReadonly($field) { |
567 | 573 | $fieldName = ($field instanceof FormField) ? $field->getName() : $field; |
@@ -616,6 +622,7 @@ discard block |
||
616 | 622 | * the children collection. Doesn't work recursively. |
617 | 623 | * |
618 | 624 | * @param string|FormField |
625 | + * @param string $field |
|
619 | 626 | * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't |
620 | 627 | * be found. |
621 | 628 | */ |
@@ -540,6 +540,7 @@ discard block |
||
540 | 540 | * |
541 | 541 | * Caution: this doesn't work on all fields, see {@link setAttribute()}. |
542 | 542 | * |
543 | + * @param string $name |
|
543 | 544 | * @return null|string |
544 | 545 | */ |
545 | 546 | public function getAttribute($name) { |
@@ -1201,7 +1202,7 @@ discard block |
||
1201 | 1202 | * |
1202 | 1203 | * @param FieldList $containerFieldList |
1203 | 1204 | * |
1204 | - * @return FieldList |
|
1205 | + * @return FormField |
|
1205 | 1206 | */ |
1206 | 1207 | public function setContainerFieldList($containerFieldList) { |
1207 | 1208 | $this->containerFieldList = $containerFieldList; |
@@ -70,6 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Get the DisplayFields |
72 | 72 | * |
73 | + * @param GridField $gridField |
|
73 | 74 | * @return array |
74 | 75 | * @see GridFieldDataColumns::setDisplayFields |
75 | 76 | */ |
@@ -29,6 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * By default, this is set to true so that it's clearer what's happening, but the predefined |
31 | 31 | * {@link GridFieldConfig} subclasses set this to false for flexibility. |
32 | + * @param boolean $throwExceptionOnBadDataType |
|
32 | 33 | */ |
33 | 34 | public function setThrowExceptionOnBadDataType($throwExceptionOnBadDataType) { |
34 | 35 | $this->throwExceptionOnBadDataType = $throwExceptionOnBadDataType; |
@@ -44,6 +45,7 @@ discard block |
||
44 | 45 | /** |
45 | 46 | * Check that this dataList is of the right data type. |
46 | 47 | * Returns false if it's a bad data type, and if appropriate, throws an exception. |
48 | + * @param SS_List $dataList |
|
47 | 49 | */ |
48 | 50 | protected function checkDataType($dataList) { |
49 | 51 | if($dataList instanceof SS_Sortable) { |