@@ -342,6 +342,10 @@ discard block |
||
342 | 342 | return $useAsMinimum ? $this->resizeByWidth( $maxWidth ) : $this->resizeByHeight( $maxHeight ); |
343 | 343 | } |
344 | 344 | |
345 | + /** |
|
346 | + * @param resource $image |
|
347 | + * @param string $webColor |
|
348 | + */ |
|
345 | 349 | public static function color_web2gd($image, $webColor) { |
346 | 350 | if(substr($webColor,0,1) == "#") $webColor = substr($webColor,1); |
347 | 351 | $r = hexdec(substr($webColor,0,2)); |
@@ -446,6 +450,9 @@ discard block |
||
446 | 450 | return $output; |
447 | 451 | } |
448 | 452 | |
453 | + /** |
|
454 | + * @param string $dirname |
|
455 | + */ |
|
449 | 456 | public function makeDir($dirname) { |
450 | 457 | if(!file_exists(dirname($dirname))) $this->makeDir(dirname($dirname)); |
451 | 458 | if(!file_exists($dirname)) mkdir($dirname, Config::inst()->get('Filesystem', 'folder_create_mask')); |
@@ -93,7 +93,8 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * @param string |
|
96 | + * @param string |
|
97 | + * @param string $tag |
|
97 | 98 | */ |
98 | 99 | public function setTag($tag) { |
99 | 100 | $this->tag = $tag; |
@@ -109,7 +110,8 @@ discard block |
||
109 | 110 | } |
110 | 111 | |
111 | 112 | /** |
112 | - * @param string |
|
113 | + * @param string |
|
114 | + * @param string $legend |
|
113 | 115 | */ |
114 | 116 | public function setLegend($legend) { |
115 | 117 | $this->legend = $legend; |
@@ -200,6 +202,9 @@ discard block |
||
200 | 202 | return false; |
201 | 203 | } |
202 | 204 | |
205 | + /** |
|
206 | + * @param string $name |
|
207 | + */ |
|
203 | 208 | public function fieldByName($name) { |
204 | 209 | return $this->children->fieldByName($name); |
205 | 210 | } |
@@ -306,6 +311,7 @@ discard block |
||
306 | 311 | * the children collection. Doesn't work recursively. |
307 | 312 | * |
308 | 313 | * @param string|FormField |
314 | + * @param string $field |
|
309 | 315 | * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't |
310 | 316 | * be found. |
311 | 317 | */ |
@@ -409,7 +409,7 @@ |
||
409 | 409 | * |
410 | 410 | * @param DataObjectInterface $record |
411 | 411 | * |
412 | - * @return boolean |
|
412 | + * @return false|null |
|
413 | 413 | */ |
414 | 414 | public function saveInto(DataObjectInterface $record) { |
415 | 415 | if(!$this->isSaveable()) { |
@@ -56,6 +56,10 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected $config; |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $name |
|
61 | + * @param string $title |
|
62 | + */ |
|
59 | 63 | public function __construct($name, $title = null, $value = ""){ |
60 | 64 | $this->config = $this->config()->default_config; |
61 | 65 | |
@@ -68,6 +72,9 @@ discard block |
||
68 | 72 | parent::__construct($name, $title, $value); |
69 | 73 | } |
70 | 74 | |
75 | + /** |
|
76 | + * @param Form $form |
|
77 | + */ |
|
71 | 78 | public function setForm($form) { |
72 | 79 | parent::setForm($form); |
73 | 80 | |
@@ -78,6 +85,9 @@ discard block |
||
78 | 85 | return $this; |
79 | 86 | } |
80 | 87 | |
88 | + /** |
|
89 | + * @param string $name |
|
90 | + */ |
|
81 | 91 | public function setName($name) { |
82 | 92 | parent::setName($name); |
83 | 93 | |
@@ -229,6 +239,7 @@ discard block |
||
229 | 239 | |
230 | 240 | /** |
231 | 241 | * @param FormField |
242 | + * @param DateField $field |
|
232 | 243 | */ |
233 | 244 | public function setDateField($field) { |
234 | 245 | $expected = $this->getName() . '[date]'; |
@@ -254,6 +265,7 @@ discard block |
||
254 | 265 | |
255 | 266 | /** |
256 | 267 | * @param FormField |
268 | + * @param TimeField $field |
|
257 | 269 | */ |
258 | 270 | public function setTimeField($field) { |
259 | 271 | $expected = $this->getName() . '[time]'; |
@@ -292,7 +304,7 @@ discard block |
||
292 | 304 | * to set field-specific config options. |
293 | 305 | * |
294 | 306 | * @param string $name |
295 | - * @param mixed $val |
|
307 | + * @param string $val |
|
296 | 308 | */ |
297 | 309 | public function setConfig($name, $val) { |
298 | 310 | $this->config[$name] = $val; |
@@ -310,7 +322,7 @@ discard block |
||
310 | 322 | * to get field-specific config options. |
311 | 323 | * |
312 | 324 | * @param String $name Optional, returns the whole configuration array if empty |
313 | - * @return mixed |
|
325 | + * @return string|null |
|
314 | 326 | */ |
315 | 327 | public function getConfig($name = null) { |
316 | 328 | if($name) { |
@@ -320,6 +332,9 @@ discard block |
||
320 | 332 | } |
321 | 333 | } |
322 | 334 | |
335 | + /** |
|
336 | + * @param RequiredFields $validator |
|
337 | + */ |
|
323 | 338 | public function validate($validator) { |
324 | 339 | $dateValid = $this->dateField->validate($validator); |
325 | 340 | $timeValid = $this->timeField->validate($validator); |
@@ -132,7 +132,6 @@ |
||
132 | 132 | /** |
133 | 133 | * Get custom validator for this field |
134 | 134 | * |
135 | - * @param Upload_Validator $validator |
|
136 | 135 | */ |
137 | 136 | public function getValidator() { |
138 | 137 | return $this->upload->getValidator(); |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | /** |
497 | 497 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
498 | 498 | * |
499 | - * @param SS_List|array $fields |
|
499 | + * @param FieldList|null $fields |
|
500 | 500 | * @param callable $funcName |
501 | 501 | * @return FormField |
502 | 502 | */ |
@@ -755,6 +755,7 @@ discard block |
||
755 | 755 | } |
756 | 756 | |
757 | 757 | /** |
758 | + * @param string $name |
|
758 | 759 | * @return string $name |
759 | 760 | */ |
760 | 761 | public function getAttribute($name) { |
@@ -788,6 +789,7 @@ discard block |
||
788 | 789 | * |
789 | 790 | * @param array Custom attributes to process. Falls back to {@link getAttributes()}. |
790 | 791 | * If at least one argument is passed as a string, all arguments act as excludes by name. |
792 | + * @param string $attrs |
|
791 | 793 | * |
792 | 794 | * @return string HTML attributes, ready for insertion into an HTML tag |
793 | 795 | */ |
@@ -963,7 +965,7 @@ discard block |
||
963 | 965 | * If set to false (the default), then the form method is only used to construct the default |
964 | 966 | * form. |
965 | 967 | * |
966 | - * @param $bool boolean |
|
968 | + * @param boolean $bool boolean |
|
967 | 969 | * @return $this |
968 | 970 | */ |
969 | 971 | public function setStrictFormMethodCheck($bool) { |
@@ -1707,6 +1709,9 @@ discard block |
||
1707 | 1709 | class Form_FieldMap extends ViewableData { |
1708 | 1710 | protected $form; |
1709 | 1711 | |
1712 | + /** |
|
1713 | + * @param Form $form |
|
1714 | + */ |
|
1710 | 1715 | public function __construct($form) { |
1711 | 1716 | $this->form = $form; |
1712 | 1717 | parent::__construct(); |
@@ -89,6 +89,7 @@ |
||
89 | 89 | * Determines if the field should render open or closed by default. |
90 | 90 | * |
91 | 91 | * @param boolean |
92 | + * @param boolean $bool |
|
92 | 93 | */ |
93 | 94 | public function startClosed($bool) { |
94 | 95 | ($bool) ? $this->addExtraClass('startClosed') : $this->removeExtraClass('startClosed'); |
@@ -27,7 +27,6 @@ discard block |
||
27 | 27 | protected $components = null; |
28 | 28 | |
29 | 29 | /** |
30 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
31 | 30 | * @return GridFieldConfig |
32 | 31 | */ |
33 | 32 | public static function create() { |
@@ -87,6 +86,7 @@ discard block |
||
87 | 86 | |
88 | 87 | /** |
89 | 88 | * @param String Class name or interface |
89 | + * @param string $type |
|
90 | 90 | * @return GridFieldConfig $this |
91 | 91 | */ |
92 | 92 | public function removeComponentsByType($type) { |
@@ -125,6 +125,7 @@ discard block |
||
125 | 125 | * Returns the first available component with the given class or interface. |
126 | 126 | * |
127 | 127 | * @param String ClassName |
128 | + * @param string $type |
|
128 | 129 | * @return GridFieldComponent |
129 | 130 | */ |
130 | 131 | public function getComponentByType($type) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * Which columns are handled by this component |
81 | 81 | * |
82 | 82 | * @param type $gridField |
83 | - * @return type |
|
83 | + * @return string[] |
|
84 | 84 | */ |
85 | 85 | public function getColumnsHandled($gridField) { |
86 | 86 | return array('Actions'); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * Which GridField actions are this component handling |
91 | 91 | * |
92 | 92 | * @param GridField $gridField |
93 | - * @return array |
|
93 | + * @return string[] |
|
94 | 94 | */ |
95 | 95 | public function getActions($gridField) { |
96 | 96 | return array('deleterecord', 'unlinkrelation'); |