Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • BaseControl
  • Button
  • Checkbox
  • HiddenField
  • ImageButton
  • MultiSelectBox
  • RadioList
  • SelectBox
  • SubmitButton
  • TextArea
  • TextBase
  • TextInput
  • UploadControl
  • Overview
  • Namespace
  • Class
  • Tree

Class UploadControl

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

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

Parameters

$label
string
label

Overrides

Nette\Forms\Controls\BaseControl::__construct
protected
# attached( Nette\Forms\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
Nette\Forms\IComponent

Overrides

Nette\Forms\Controls\BaseControl::attached
public Nette\Http\FileUpload
# setValue( array|Nette\Http\FileUpload $value )

Sets control's value.

Sets control's value.

Parameters

$value
array|Nette\Http\FileUpload

Returns

Nette\Http\FileUpload
provides a fluent interface

Overrides

Nette\Forms\Controls\BaseControl::setValue

Implementation of

Nette\Forms\IControl::setValue
public boolean
# isFilled( )

Has been any file uploaded?

Has been any file uploaded?

Returns

boolean

Overrides

Nette\Forms\Controls\BaseControl::isFilled
public static boolean
# validateFileSize( Nette\Forms\Controls\UploadControl $control, integer $limit )

FileSize validator: is file size in limit?

FileSize validator: is file size in limit?

Parameters

$control
Nette\Forms\Controls\UploadControl
$limit
integer
file size limit

Returns

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

MimeType validator: has file specified mime type?

MimeType validator: has file specified mime type?

Parameters

$control
Nette\Forms\Controls\UploadControl
$mimeType
array|string
mime type

Returns

boolean
public static boolean
# validateImage( Nette\Forms\Controls\UploadControl $control )

Image validator: is file image?

Image validator: is file image?

Parameters

$control
Nette\Forms\Controls\UploadControl

Returns

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