silverstripe-userforms/code/editor/EditableFileField.php

33 lines
631 B
PHP
Raw Normal View History

<?php
/**
* Allows a user to add a field that can be used to upload a file
*
* @package userforms
*/
class EditableFileField extends EditableFormField {
/**
* @see Upload->allowedMaxFileSize
* @var int
*/
public static $allowed_max_file_size;
/**
* @see Upload->allowedExtensions
* @var array
*/
public static $allowed_extensions = array();
static $singular_name = 'File Upload Field';
static $plural_names = 'File Fields';
2009-04-27 06:32:47 +02:00
public function getFormField() {
return new FileField($this->Name, $this->Title);
}
public function getSubmittedFormField() {
return new SubmittedFileField();
}
}