class BaseCachedFile extends BaseAction

Cached file management actions. This class handles file caching in the web space

Basically, files are stored outside the web space (by default in local/media/), and cached in the web space (by default in web/local/).

In the file cache directory, a subdirectory for files categories (eg. product, category, folder, etc.) is automatically created, and the cached file is created here. Plugin may use their own subdirectory as required.

A copy (or symbolic link, by default) of the original file is created in the cache.

Methods

mixed
genericToggleVisibility( ModelCriteria $query, ToggleVisibilityEvent $event, EventDispatcherInterface $dispatcher = null)

Toggle visibility for an object

from  BaseAction
__construct( FileManager $fileManager)

No description

clearCache( CachedFileEvent $event)

Clear the file cache. Is a subdirectory is specified, only this directory is cleared.

saveFile( FileCreateOrUpdateEvent $event)

Take care of saving a file in the database and file storage

updateFile( FileCreateOrUpdateEvent $event)

Take care of updating file in the database and file storage

deleteFile( FileDeleteEvent $event)

Deleting file in the database and in storage

updatePosition( UpdateFilePositionEvent $event, $eventName, EventDispatcherInterface $dispatcher)

No description

toggleVisibility( FileToggleVisibilityEvent $event, $eventName, EventDispatcherInterface $dispatcher)

No description

Details

in BaseAction at line 130
mixed genericToggleVisibility( ModelCriteria $query, ToggleVisibilityEvent $event, EventDispatcherInterface $dispatcher = null)

Toggle visibility for an object

Parameters

ModelCriteria $query
ToggleVisibilityEvent $event
EventDispatcherInterface $dispatcher

Return Value

mixed

at line 49
__construct( FileManager $fileManager)

Parameters

FileManager $fileManager

at line 66
clearCache( CachedFileEvent $event)

Clear the file cache. Is a subdirectory is specified, only this directory is cleared.

If no directory is specified, the whole cache is cleared. Only files are deleted, directories will remain.

Parameters

CachedFileEvent $event

at line 199
saveFile( FileCreateOrUpdateEvent $event)

Take care of saving a file in the database and file storage

Parameters

FileCreateOrUpdateEvent $event Image event

Exceptions

Exception

at line 239
updateFile( FileCreateOrUpdateEvent $event)

Take care of updating file in the database and file storage

Parameters

FileCreateOrUpdateEvent $event Image event

Exceptions

FileException

at line 262
deleteFile( FileDeleteEvent $event)

Deleting file in the database and in storage

Parameters

FileDeleteEvent $event Image event

at line 267
updatePosition( UpdateFilePositionEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Parameters

UpdateFilePositionEvent $event
$eventName
EventDispatcherInterface $dispatcher

at line 272
toggleVisibility( FileToggleVisibilityEvent $event, $eventName, EventDispatcherInterface $dispatcher)

Parameters

FileToggleVisibilityEvent $event
$eventName
EventDispatcherInterface $dispatcher