Packages

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

Classes

  • NButton
  • NCheckbox
  • NConventionalRenderer
  • NFileUpload
  • NForm
  • NFormContainer
  • NFormGroup
  • NHiddenField
  • NImageButton
  • NInstantClientScript
  • NMultiSelectBox
  • NRadioList
  • NRule
  • NRules
  • NSelectBox
  • NSubmitButton
  • NTextArea
  • NTextBase
  • NTextInput

Interfaces

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

Class NFileUpload

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

NObject
Extended by NComponent implements IComponent
Extended by NFormControl implements IFormControl
Extended by NFileUpload
Package: 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 NFileUpload
# setValue( array|NHttpUploadedFile $value )

Sets control's value.

Sets control's value.

Parameters

$value
array|NHttpUploadedFile

Returns

NFileUpload
provides a fluent interface

Implementation of

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

Filled validator: has been any file uploaded?

Filled validator: has been any file uploaded?

Parameters

$control
IFormControl

Returns

boolean
public static boolean
# validateFileSize( NFileUpload $control, integer $limit )

FileSize validator: is file size in limit?

FileSize validator: is file size in limit?

Parameters

$control
NFileUpload
$limit
integer
file size limit

Returns

boolean
public static boolean
# validateMimeType( NFileUpload $control, array|string $mimeType )

MimeType validator: has file specified mime type?

MimeType validator: has file specified mime type?

Parameters

$control
NFileUpload
$mimeType
array|string
mime type

Returns

boolean
Methods inherited from NFormControl
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 NComponent
__clone(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from IComponent
NAME_SEPARATOR
Properties inherited from NFormControl
$caption, $control, $idMask, $label, $value
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0