class MediaThumbnailCommands in Media Thumbnails 8
Drush 9 integration for the media thumbnails module.
Hierarchy
- class \Drupal\media_thumbnails\Commands\MediaThumbnailCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of MediaThumbnailCommands
File
- src/
Commands/ MediaThumbnailCommands.php, line 11
Namespace
Drupal\media_thumbnails\CommandsView source
class MediaThumbnailCommands extends DrushCommands {
/**
* Refresh the thumbnails for all media entities.
*
* @aliases thref,thumbnails-refresh
* @command thumbnails:refresh
* @usage drush thumbnails:refresh
* Refresh thumbnails for all media entities
*/
public function refresh() {
batch_set(RefreshBatch::createBatch());
$batch =& batch_get();
$batch['progressive'] = FALSE;
drush_backend_batch_process();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaThumbnailCommands:: |
public | function | Refresh the thumbnails for all media entities. |