You are here

function hook_widgets_set_flush in Widgets 7

Respond to image set flushing.

This hook enables modules to take element when a set is being flushed (all images are being deleted from the server and regenerated). Any module-specific caches that contain information related to the set should be cleared using this hook. This hook is called whenever a set is updated, deleted, or any element associated with the set is update or deleted.

Parameters

$set: The image set array that is being flushed.

1 invocation of hook_widgets_set_flush()
widgets_set_flush in ./widgets.module
Flush cached media for a set.

File

./widgets.api.php, line 119
Hooks related to widget sets and widgets. TODO: Update API docs NOTICE: This file has been copied from the image module and has not been updated for use with Widgets yet.

Code

function hook_widgets_set_flush($set) {

  // Empty cached data that contains information about the set.
  cache_clear_all('*', 'cache_mymodule', TRUE);
}