44 parent::initializeArguments();
45 $this->registerTagAttribute(
'disabled',
'string',
'Specifies that the input element should be disabled when the page loads');
46 $this->registerTagAttribute(
'multiple',
'string',
'Specifies that the file input element should allow multiple selection of files');
47 $this->registerArgument(
'errorClass',
'string',
'CSS class to set if there are errors for this ViewHelper',
false,
'f3-form-error');
48 $this->registerUniversalTagAttributes();
59 $allowedFields = [
'name',
'type',
'tmp_name',
'error',
'size'];
60 foreach ($allowedFields as $fieldName) {
63 $this->tag->addAttribute(
'type',
'file');
65 if (isset($this->arguments[
'multiple'])) {
66 $this->tag->addAttribute(
'name', $name .
'[]');
68 $this->tag->addAttribute(
'name', $name);
72 return $this->tag->render();