You are here

function assetfield_js_callback in Asset 6

Same name and namespace in other branches
  1. 5.2 asset_wizard.module \assetfield_js_callback()
1 string reference to 'assetfield_js_callback'
asset_wizard_menu in ./asset_wizard.module
Implementation of hook_menu().

File

./asset_wizard.module, line 190
Wizard-style interface for Asset.

Code

function assetfield_js_callback($asset) {
  $data = array(
    'title' => $asset->title,
  );
  $icon = asset_type_invoke($asset, 'icon');
  if (!$icon) {
    $icon = drupal_get_path('module', 'asset') . '/icons/file.png';
  }
  $data['icon'] = base_path() . $icon;
  print drupal_to_js($data);
  exit;
}