PHP Class Neos\FluidAdaptor\ViewHelpers\Form\UploadViewHelper

Make sure to set enctype="multipart/form-data" on the form! If a file has been uploaded successfully and the form is re-displayed due to validation errors, this ViewHelper will render hidden fields that contain the previously generated resource so you won't have to upload the file again. You can use a separate ViewHelper to display previously uploaded resources in order to remove/replace them. = Examples =
Inheritance: extends AbstractFormFieldViewHelper
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$propertyMapper Neos\Flow\Property\PropertyMapper
$tagName string

Méthodes publiques

Méthode Description
initializeArguments ( ) : void
render ( ) : string Renders the upload field.

Méthodes protégées

Méthode Description
getNameWithoutPrefix ( ) : string Get the name of this form element, without prefix.
getUploadedResource ( ) : PersistentResource Returns a previously uploaded resource, or the resource specified via "value" argument if no resource has been uploaded before If errors occurred during property mapping for this property, NULL is returned

Method Details

getNameWithoutPrefix() protected méthode

Note: This is overridden here because the "value" argument should not have an effect on the name attribute of the tag In the original implementation, setting a value will influence the name, @see AbstractFormFieldViewHelper::getNameWithoutPrefix()
protected getNameWithoutPrefix ( ) : string
Résultat string name

getUploadedResource() protected méthode

Returns a previously uploaded resource, or the resource specified via "value" argument if no resource has been uploaded before If errors occurred during property mapping for this property, NULL is returned
protected getUploadedResource ( ) : PersistentResource
Résultat Neos\Flow\ResourceManagement\PersistentResource or NULL if no resource was uploaded and the "value" argument is not set

initializeArguments() public méthode

public initializeArguments ( ) : void
Résultat void

render() public méthode

Renders the upload field.
public render ( ) : string
Résultat string

Property Details

$propertyMapper protected_oe property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Résultat Neos\Flow\Property\PropertyMapper

$tagName protected_oe property

protected string $tagName
Résultat string