You are here

function imageinfo_cache_drush_command in Imageinfo Cache 7.3

Implements hook_drush_command().

File

./imageinfo_cache.drush.inc, line 13
Image module's drush integration.

Code

function imageinfo_cache_drush_command() {
  $items['image-generate'] = array(
    'callback' => 'drush_imageinfo_cache_image_generate',
    'description' => 'Generate all derived images for a given field and style.',
    'core' => array(
      '7+',
    ),
    'drupal_dependencies' => array(
      'image',
    ),
    'arguments' => array(
      'field_name' => 'An image field machine name. If not provided, user may choose from a list of names.',
      'style' => 'An image style machine name. If not provided, user may choose from a list of names.',
    ),
    'examples' => array(
      'drush image-generate' => 'Pick an image field name and image style to generate.',
      'drush image-generate field_image' => 'Pick an image style to generate for the selected image field.',
      'drush image-generate all all' => 'Generate all images styles for all image fields.',
      'drush image-generate all inuse' => 'Generate images styles in use for all image fields.',
      'drush image-generate field_image all' => 'Generate all image styles for the selected image field.',
      'drush image-generate field_image inuse' => 'Generate image styles in use for the selected image field.',
      'drush image-generate field_image thumbnail' => 'Generate the selected image style for the selected image field.',
    ),
  );
  return $items;
}