PHP Класс 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 =
Наследование: extends AbstractFormFieldViewHelper
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$propertyMapper Neos\Flow\Property\PropertyMapper
$tagName string

Открытые методы

Метод Описание
initializeArguments ( ) : void
render ( ) : string Renders the upload field.

Защищенные методы

Метод Описание
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

Описание методов

getNameWithoutPrefix() защищенный Метод

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
Результат string name

getUploadedResource() защищенный Метод

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
Результат Neos\Flow\ResourceManagement\PersistentResource or NULL if no resource was uploaded and the "value" argument is not set

initializeArguments() публичный Метод

public initializeArguments ( ) : void
Результат void

render() публичный Метод

Renders the upload field.
public render ( ) : string
Результат string

Описание свойств

$propertyMapper защищенное свойство

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Результат Neos\Flow\Property\PropertyMapper

$tagName защищенное свойство

protected string $tagName
Результат string