You are here

function theme_asset_render_default in Asset 6

Same name and namespace in other branches
  1. 5 asset.module \theme_asset_render_default()

Default rendering available to all assets.

2 theme calls to theme_asset_render_default()
asset_asset_formatter in inc/asset.api.inc
Implementation of hook_asset_formatter().
asset_render_macro in ./asset.module
build html from atrributes array.

File

inc/asset.themes.inc, line 59

Code

function theme_asset_render_default($asset) {
  if (substr($asset->url, 0, 5) != "http:") {
    $asset->url = url($asset->url);
  }
  $asset->title = $asset->title ? $asset->title : $asset->filename;
  return l($asset->title, $asset->url, array(
    'attributes' => array(
      'class' => 'asset',
    ),
  ));
}