ImportOptions
class ImportOptions (View source)
Options to be used when importing a file.
Properties
protected StorageLocationFactory | $storageLocationFactory | ||
protected Filesystem | $filesystem | ||
private FileFolder|null | $importToFolder | ||
private File|null | $addNewFileVersion | ||
private StorageLocation|null | $storageLocation | ||
private string | $customPrefix | ||
private bool | $skipThumbnailGeneration | Skip the thumbnail generation? |
|
private bool | $canChangeLocalFile | Can the local file be changed by file processors? If no, we'll create a copy of the file being imported. |
Methods
Initialize the instance.
The import process should create new files in a specific folder.
The import process should store the file in this folder.
The import process should add a new file Version to this File object (NULL: no).
Get the storage location where imported files should be saved to.
Set the custom prefix to be used to store the file.
Get the custom prefix to be used to store the file.
Skip the thumbnail generation?
Skip the thumbnail generation?
Can the local file be changed by file processors? If no, we'll create a copy of the file being imported.
Can the local file be changed by file processors? If no, we'll create a copy of the file being imported.
Details
__construct(Filesystem $filesystem, StorageLocationFactory $storageLocationFactory)
Initialize the instance.
$this
setImportToFolder(FileFolder $folder)
The import process should create new files in a specific folder.
$this
setAddNewVersionTo(File $toFile)
The import process should add a new Version to an existing File.
FileFolder
getImportToFolder()
The import process should store the file in this folder.
File|null
getAddNewVersionTo()
The import process should add a new file Version to this File object (NULL: no).
StorageLocation
getStorageLocation()
Get the storage location where imported files should be saved to.
$this
setCustomPrefix(string $value)
Set the custom prefix to be used to store the file.
Make sure it conforms to standards (e.g. it is 12 digits, numeric only).
string
getCustomPrefix()
Get the custom prefix to be used to store the file.
bool
isSkipThumbnailGeneration()
Skip the thumbnail generation?
$this
setSkipThumbnailGeneration(bool $value)
Skip the thumbnail generation?
bool
canChangeLocalFile()
Can the local file be changed by file processors? If no, we'll create a copy of the file being imported.
$this
setCanChangeLocalFile(bool $value)
Can the local file be changed by file processors? If no, we'll create a copy of the file being imported.
protected StorageLocation
getFileStorageLocation(File $file)
Get the storage location associated to a file.
protected StorageLocation
getFolderStorageLocation(FileFolder $folder)
Get the storage location associated to a folder.