Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • Button
  • Checkbox
  • ConventionalRenderer
  • FileUpload
  • Form
  • FormContainer
  • FormControl
  • FormGroup
  • HiddenField
  • ImageButton
  • InstantClientScript
  • MultiSelectBox
  • RadioList
  • Rule
  • Rules
  • SelectBox
  • SubmitButton
  • TextArea
  • TextBase
  • TextInput

Interfaces

  • IFormControl
  • IFormRenderer
  • INamingContainer
  • ISubmitterControl
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class FileUpload

Text box and browse button that allow users to select a file to upload to the server.

Nette\Object
Extended by Nette\Component implements Nette\IComponent
Extended by Nette\Forms\FormControl implements Nette\Forms\IFormControl
Extended by Nette\Forms\FileUpload
Namespace: Nette\Forms
Author: David Grudl
Located at Forms/Controls/FileUpload.php
Methods summary
public
# __construct( string $label = NULL )

Parameters

$label
string
label
protected
# attached( IComponent $form )

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.

Parameters

$form
IComponent
public Nette\Forms\FileUpload
# setValue( array|Nette\Web\HttpUploadedFile $value )

Sets control's value.

Sets control's value.

Parameters

$value
array|Nette\Web\HttpUploadedFile

Returns

Nette\Forms\FileUpload
provides a fluent interface

Implementation of

Nette\Forms\IFormControl::setValue
public static boolean
# validateFilled( Nette\Forms\IFormControl $control )

Filled validator: has been any file uploaded?

Filled validator: has been any file uploaded?

Parameters

$control
Nette\Forms\IFormControl

Returns

boolean
public static boolean
# validateFileSize( Nette\Forms\FileUpload $control, integer $limit )

FileSize validator: is file size in limit?

FileSize validator: is file size in limit?

Parameters

$control
Nette\Forms\FileUpload
$limit
integer
file size limit

Returns

boolean
public static boolean
# validateMimeType( Nette\Forms\FileUpload $control, array|string $mimeType )

MimeType validator: has file specified mime type?

MimeType validator: has file specified mime type?

Parameters

$control
Nette\Forms\FileUpload
$mimeType
array|string
mime type

Returns

boolean
Methods inherited from Nette\Forms\FormControl
addCondition(), addConditionOn(), addError(), addRule(), cleanErrors(), getControl(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), getValue(), hasErrors(), isDisabled(), loadHttpData(), notifyRule(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setTranslator(), translate(), validateEqual(), validateValid()
Methods inherited from Nette\Component
__clone(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent()
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from Nette\IComponent
NAME_SEPARATOR
Properties inherited from Nette\Forms\FormControl
$caption, $control, $idMask, $label, $value
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0