You are here

function _imagecache_asset_description in Asset 5.2

2 calls to _imagecache_asset_description()
imagecache_asset_formatter in modules/asset_imagecache.inc
imagecache_asset_settings in modules/asset_imagecache.inc

File

modules/asset_imagecache.inc, line 66

Code

function _imagecache_asset_description($preset_id) {
  $actions = _imagecache_actions_get_by_presetid($preset_id);
  $items = array();
  foreach ($actions as $action) {
    switch ($action['data']['function']) {
      case 'scale':
        $items[] = 'Proportionally scaled to ' . $action['data']['fit'] . ' dimensions of ' . $action['data']['width'] . 'x' . $action['data']['height'] . '.';
        break;
      case 'resize':
        $items[] = 'Non-Proportionally scaled to ' . $action['data']['width'] . 'x' . $action['data']['height'] . '.';
        break;
      case 'crop':
        $items[] = 'Cropped to ' . $action['data']['width'] . 'x' . $action['data']['height'] . ' at offset ' . $action['data']['xoffset'] . ',' . $action['data']['yoffset'] . '.';
        break;
    }
  }
  return join($items, '  Then, ');
}