Importer
class Importer (View source)
Constants
| E_PHP_FILE_ERROR_DEFAULT | 
                     Standard PHP error: there is no error, the file uploaded with success.  | 
            
| E_PHP_FILE_EXCEEDS_UPLOAD_MAX_FILESIZE | 
                     Standard PHP error: the uploaded file exceeds the upload_max_filesize directive in php.ini.  | 
            
| E_PHP_FILE_EXCEEDS_HTML_MAX_FILE_SIZE | 
                     Standard PHP error: the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.  | 
            
| E_PHP_FILE_PARTIAL_UPLOAD | 
                     Standard PHP error: the uploaded file was only partially uploaded.  | 
            
| E_PHP_NO_FILE | 
                     Standard PHP error: no file was uploaded.  | 
            
| E_PHP_NO_TMP_DIR | 
                     Standard PHP error: missing a temporary folder.  | 
            
| E_PHP_CANT_WRITE | 
                     Standard PHP error: failed to write file to disk.  | 
            
| E_PHP_EXTENSION | 
                     Standard PHP error: a PHP extension stopped the file upload.  | 
            
| E_FILE_INVALID_EXTENSION | 
                     concrete5 internal error: invalid file extension.  | 
            
| E_FILE_INVALID | 
                     concrete5 internal error: pointer is invalid file, is a directory, etc. ..  | 
            
| E_FILE_UNABLE_TO_STORE | 
                     concrete5 internal error: unable to copy file to storage location.  | 
            
| E_FILE_INVALID_STORAGE_LOCATION | 
                     concrete5 internal error: default file storage location not found.  | 
            
| E_FILE_UNABLE_TO_STORE_PREFIX_PROVIDED | 
                     concrete5 internal error: unable to copy file to storage location (with provided prefix).  | 
            
| E_FILE_EXCEEDS_POST_MAX_FILE_SIZE | 
                     concrete5 internal error: Uploaded file is too large.  | 
            
Properties
| protected bool | $rescanThumbnailsOnImport | Should thumbnails be scanned when importing an image?  | 
                |
| protected ProcessorInterface | $importProcessors | The list of configured import processors.  | 
                |
| protected Application | $app | 
Methods
No description
Returns a text string explaining the error that was passed.
Generate a file prefix.
Imports a local file into the system.
Import a file in the default file storage location's incoming directory.
Import a file received via a POST request to the default file storage location.
Enable scanning of thumbnails when importing an image?
Details
        
                            
    __construct()
        
    
    No description
        
                static            string
    getErrorMessage(int $code)
        
    
    Returns a text string explaining the error that was passed.
        
                            
    addImportProcessor(ProcessorInterface $processor)
        
    
    Add an import processor.
        
                            string
    generatePrefix()
        
    
    Generate a file prefix.
        
                            Version|int
    import(string $pointer, string|bool $filename = false, File|FileFolder|null|false $fr = false, string|null $prefix = null)
        
    
    Imports a local file into the system.
        
                            Version|int
    importIncomingFile(string $filename, File|FileFolder|null|false $fr = false)
        
    
    Import a file in the default file storage location's incoming directory.
        
                            Version|int
    importUploadedFile(UploadedFile $uploadedFile = null, File|FileFolder|null|false $fr = false)
        
    
    Import a file received via a POST request to the default file storage location.
        
                            
    setRescanThumbnailsOnImport(bool $refresh)
        
    
    Enable scanning of thumbnails when importing an image?