SilverStripe\Registry\RegistryImportFeed
Synopsis
class RegistryImportFeed
{
- // members
- private static string $storage_path = '_imports/{model}';
- private static string $storage_filename = 'import-{date}.csv';
- protected $modelClass;
- protected GeneratedAssetHandler $assetHandler;
- protected $assetsDir;
- // methods
- public void setModelClass()
- public void getLatest()
- public $this setAssetHandler()
- public GeneratedAssetHandler getAssetHandler()
- public string getStoragePath()
- public ArrayList getImportFiles()
- public string getImportFilename()
- public $this setAssetsDir()
- public string getAssetsDir()
- protected string sanitiseClassName()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Injector\Injectable
Members
private
- $storage_filename
—
string
The filename to use for storing imported record files. Used by RegistryImportFeedController to save files to. - $storage_path
—
string
The path format to store imported record files in (inside the assets directory)
protected
- $assetHandler
—
SilverStripe\Assets\Storage\GeneratedAssetHandler
The class used to manipulate imported feed files on the filesystem - $assetsDir
—
string
The "assets" folder name - $modelClass
Methods
protected
- sanitiseClassName() — See {@link \SilverStripe\Admin\ModelAdmin::sanitiseClassName}
public
- getAssetHandler() — Get the handler used to manipulate the filesystem
- getAssetsDir() — Get the assets directory name
- getImportFilename() — Returns a relatively unique filename to storage imported data feeds as
- getImportFiles() — Loop import files in the storage path and push them into an {@link ArrayList}
- getLatest()
- getStoragePath() — Get the path that import files will be stored for this model
- setAssetHandler() — Set the handler used to manipulate the filesystem, and add the ListFiles plugin from Flysystem to inspect the contents of a directory
- setAssetsDir() — Set the assets directory name
- setModelClass()