1414 * Container for form controls.
1515 *
1616 * @property Nette\Utils\ArrayHash $values
17- * @property-read \ArrayIterator $controls
18- * @property-read Form $form
17+ * @property-read \Iterator $controls
18+ * @property-read Form|NULL $form
1919 */
2020class Container extends Nette \ComponentModel \Container implements \ArrayAccess
2121{
2222 /** @var callable[] function (Container $sender); Occurs when the form is validated */
2323 public $ onValidate ;
2424
25- /** @var ControlGroup */
25+ /** @var ControlGroup|NULL */
2626 protected $ currentGroup ;
2727
2828 /** @var bool */
@@ -34,8 +34,8 @@ class Container extends Nette\ComponentModel\Container implements \ArrayAccess
3434
3535 /**
3636 * Fill-in with default values.
37- * @param iterable values used to fill the form
38- * @param bool erase other default values?
37+ * @param iterable
38+ * @param bool
3939 * @return static
4040 */
4141 public function setDefaults ($ values , $ erase = FALSE )
@@ -50,8 +50,8 @@ public function setDefaults($values, $erase = FALSE)
5050
5151 /**
5252 * Fill-in with values.
53- * @param iterable values used to fill the form
54- * @param bool erase other controls?
53+ * @param iterable
54+ * @param bool
5555 * @return static
5656 * @internal
5757 */
@@ -88,7 +88,7 @@ public function setValues($values, $erase = FALSE)
8888
8989 /**
9090 * Returns the values submitted by the form.
91- * @param bool return values as an array?
91+ * @param bool
9292 * @return Nette\Utils\ArrayHash|array
9393 */
9494 public function getValues ($ asArray = FALSE )
@@ -180,7 +180,7 @@ public function setCurrentGroup(ControlGroup $group = NULL)
180180
181181 /**
182182 * Returns current group.
183- * @return ControlGroup
183+ * @return ControlGroup|NULL
184184 */
185185 public function getCurrentGroup ()
186186 {
@@ -191,7 +191,7 @@ public function getCurrentGroup()
191191 /**
192192 * Adds the specified component to the IContainer.
193193 * @param Nette\ComponentModel\IComponent
194- * @param string
194+ * @param string|int
195195 * @param string
196196 * @return static
197197 * @throws Nette\InvalidStateException
@@ -208,7 +208,7 @@ public function addComponent(Nette\ComponentModel\IComponent $component, $name,
208208
209209 /**
210210 * Iterates over all form controls.
211- * @return \ArrayIterator
211+ * @return \Iterator
212212 */
213213 public function getControls ()
214214 {
@@ -219,7 +219,7 @@ public function getControls()
219219 /**
220220 * Returns form.
221221 * @param bool
222- * @return Form
222+ * @return Form|NULL
223223 */
224224 public function getForm ($ throw = TRUE )
225225 {
@@ -232,10 +232,10 @@ public function getForm($throw = TRUE)
232232
233233 /**
234234 * Adds single-line text input control to the form.
235- * @param string control name
236- * @param string label
237- * @param int width of the control (deprecated)
238- * @param int maximum number of characters the user may enter
235+ * @param string
236+ * @param string|object
237+ * @param int
238+ * @param int
239239 * @return Controls\TextInput
240240 */
241241 public function addText ($ name , $ label = NULL , $ cols = NULL , $ maxLength = NULL )
@@ -247,10 +247,10 @@ public function addText($name, $label = NULL, $cols = NULL, $maxLength = NULL)
247247
248248 /**
249249 * Adds single-line text input control used for sensitive input such as passwords.
250- * @param string control name
251- * @param string label
252- * @param int width of the control (deprecated)
253- * @param int maximum number of characters the user may enter
250+ * @param string
251+ * @param string|object
252+ * @param int
253+ * @param int
254254 * @return Controls\TextInput
255255 */
256256 public function addPassword ($ name , $ label = NULL , $ cols = NULL , $ maxLength = NULL )
@@ -263,10 +263,10 @@ public function addPassword($name, $label = NULL, $cols = NULL, $maxLength = NUL
263263
264264 /**
265265 * Adds multi-line text input control to the form.
266- * @param string control name
267- * @param string label
268- * @param int width of the control
269- * @param int height of the control in text lines
266+ * @param string
267+ * @param string|object
268+ * @param int
269+ * @param int
270270 * @return Controls\TextArea
271271 */
272272 public function addTextArea ($ name , $ label = NULL , $ cols = NULL , $ rows = NULL )
@@ -278,8 +278,8 @@ public function addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
278278
279279 /**
280280 * Adds input for email.
281- * @param string control name
282- * @param string label
281+ * @param string
282+ * @param string|object
283283 * @return Controls\TextInput
284284 */
285285 public function addEmail ($ name , $ label = NULL )
@@ -292,8 +292,8 @@ public function addEmail($name, $label = NULL)
292292
293293 /**
294294 * Adds input for integer.
295- * @param string control name
296- * @param string label
295+ * @param string
296+ * @param string|object
297297 * @return Controls\TextInput
298298 */
299299 public function addInteger ($ name , $ label = NULL )
@@ -307,9 +307,9 @@ public function addInteger($name, $label = NULL)
307307
308308 /**
309309 * Adds control that allows the user to upload files.
310- * @param string control name
311- * @param string label
312- * @param bool allows to upload multiple files
310+ * @param string
311+ * @param string|object
312+ * @param bool
313313 * @return Controls\UploadControl
314314 */
315315 public function addUpload ($ name , $ label = NULL , $ multiple = FALSE )
@@ -320,8 +320,8 @@ public function addUpload($name, $label = NULL, $multiple = FALSE)
320320
321321 /**
322322 * Adds control that allows the user to upload multiple files.
323- * @param string control name
324- * @param string label
323+ * @param string
324+ * @param string|object
325325 * @return Controls\UploadControl
326326 */
327327 public function addMultiUpload ($ name , $ label = NULL )
@@ -332,8 +332,8 @@ public function addMultiUpload($name, $label = NULL)
332332
333333 /**
334334 * Adds hidden form control used to store a non-displayed value.
335- * @param string control name
336- * @param mixed default value
335+ * @param string
336+ * @param string
337337 * @return Controls\HiddenField
338338 */
339339 public function addHidden ($ name , $ default = NULL )
@@ -345,8 +345,8 @@ public function addHidden($name, $default = NULL)
345345
346346 /**
347347 * Adds check box control to the form.
348- * @param string control name
349- * @param string caption
348+ * @param string
349+ * @param string|object
350350 * @return Controls\Checkbox
351351 */
352352 public function addCheckbox ($ name , $ caption = NULL )
@@ -357,9 +357,8 @@ public function addCheckbox($name, $caption = NULL)
357357
358358 /**
359359 * Adds set of radio button controls to the form.
360- * @param string control name
361- * @param string label
362- * @param array options from which to choose
360+ * @param string
361+ * @param string|object
363362 * @return Controls\RadioList
364363 */
365364 public function addRadioList ($ name , $ label = NULL , array $ items = NULL )
@@ -370,6 +369,8 @@ public function addRadioList($name, $label = NULL, array $items = NULL)
370369
371370 /**
372371 * Adds set of checkbox controls to the form.
372+ * @param string
373+ * @param string|object
373374 * @return Controls\CheckboxList
374375 */
375376 public function addCheckboxList ($ name , $ label = NULL , array $ items = NULL )
@@ -380,10 +381,10 @@ public function addCheckboxList($name, $label = NULL, array $items = NULL)
380381
381382 /**
382383 * Adds select box control that allows single item selection.
383- * @param string control name
384- * @param string label
385- * @param array items from which to choose
386- * @param int number of rows that should be visible
384+ * @param string
385+ * @param string|object
386+ * @param array
387+ * @param int
387388 * @return Controls\SelectBox
388389 */
389390 public function addSelect ($ name , $ label = NULL , array $ items = NULL , $ size = NULL )
@@ -395,10 +396,10 @@ public function addSelect($name, $label = NULL, array $items = NULL, $size = NUL
395396
396397 /**
397398 * Adds select box control that allows multiple item selection.
398- * @param string control name
399- * @param string label
400- * @param array options from which to choose
401- * @param int number of rows that should be visible
399+ * @param string
400+ * @param string|object
401+ * @param array
402+ * @param int
402403 * @return Controls\MultiSelectBox
403404 */
404405 public function addMultiSelect ($ name , $ label = NULL , array $ items = NULL , $ size = NULL )
@@ -410,8 +411,8 @@ public function addMultiSelect($name, $label = NULL, array $items = NULL, $size
410411
411412 /**
412413 * Adds button used to submit form.
413- * @param string control name
414- * @param string caption
414+ * @param string
415+ * @param string|object
415416 * @return Controls\SubmitButton
416417 */
417418 public function addSubmit ($ name , $ caption = NULL )
@@ -422,8 +423,8 @@ public function addSubmit($name, $caption = NULL)
422423
423424 /**
424425 * Adds push buttons with no default behavior.
425- * @param string control name
426- * @param string caption
426+ * @param string
427+ * @param string|object
427428 * @return Controls\Button
428429 */
429430 public function addButton ($ name , $ caption = NULL )
@@ -434,7 +435,7 @@ public function addButton($name, $caption = NULL)
434435
435436 /**
436437 * Adds graphical button used to submit form.
437- * @param string control name
438+ * @param string
438439 * @param string URI of the image
439440 * @param string alternate text for the image
440441 * @return Controls\ImageButton
@@ -447,7 +448,7 @@ public function addImage($name, $src = NULL, $alt = NULL)
447448
448449 /**
449450 * Adds naming container to the form.
450- * @param string name
451+ * @param string|int
451452 * @return self
452453 */
453454 public function addContainer ($ name )
@@ -487,7 +488,7 @@ public static function extensionMethod($name, $callback = NULL)
487488
488489 /**
489490 * Adds the component to the container.
490- * @param string component name
491+ * @param string|int
491492 * @param Nette\ComponentModel\IComponent
492493 * @return void
493494 */
@@ -499,7 +500,7 @@ public function offsetSet($name, $component)
499500
500501 /**
501502 * Returns component specified by name. Throws exception if component doesn't exist.
502- * @param string component name
503+ * @param string|int
503504 * @return Nette\ComponentModel\IComponent
504505 * @throws Nette\InvalidArgumentException
505506 */
@@ -511,7 +512,7 @@ public function offsetGet($name)
511512
512513 /**
513514 * Does component specified by name exists?
514- * @param string component name
515+ * @param string|int
515516 * @return bool
516517 */
517518 public function offsetExists ($ name )
@@ -522,7 +523,7 @@ public function offsetExists($name)
522523
523524 /**
524525 * Removes component from the container.
525- * @param string component name
526+ * @param string|int
526527 * @return void
527528 */
528529 public function offsetUnset ($ name )
0 commit comments