function asset_page_format in Asset 5.2
Menu callback; view available formatters.
Related topics
1 string reference to 'asset_page_format'
- asset_menu in ./
asset.module - Implementation of hook_menu().
File
- ./
asset.module, line 661 - Main module.
Code
function asset_page_format($asset, $format = NULL) {
if (in_array($format, array_keys($asset->formatters))) {
$format = $asset->formatters[$format];
$attr = array(
'format' => $format->format,
);
return module_invoke($format->module, 'asset_formatter', 'render', $asset, $attr);
}
else {
$items = array();
foreach ($asset->formatters as $format) {
$items[] = l($format->name, 'asset/' . $asset->aid . '/format/' . $format->format) . '<br/>' . $format->description;
}
return theme('item_list', $items);
}
}