function views_handler_field_system_info_screenshot::render in Views System 6.2
Same name and namespace in other branches
- 6.3 views/handlers/views_handler_field_system_info_screenshot.inc \views_handler_field_system_info_screenshot::render()
- 7.3 views/handlers/views_handler_field_system_info_screenshot.inc \views_handler_field_system_info_screenshot::render()
File
- views/
handlers/ views_handler_field_system_info_screenshot.inc, line 50 - Views field handler for the views_system module.
Class
- views_handler_field_system_info_screenshot
- Provides display options and renders the screenshot field of the system item.
Code
function render($values) {
$info = unserialize($values->{$this->field_alias});
if (isset($info['screenshot'])) {
$path = _views_system_get_screenshot($info);
if ($path) {
if ($this->options['system_info_screenshot_image']) {
drupal_add_css(drupal_get_path('module', 'views_system') . '/styles/views-system-screenshot.css', 'module', 'all', FALSE);
$alt = t('Screenshot for !theme theme', array(
'!theme' => $info['name'],
));
$title = t('Screenshot for !theme theme', array(
'!theme' => $info['name'],
));
$attributes = array(
'class' => check_plain($this->options['system_info_screenshot_image_class']),
);
$output = theme('image', $path, $alt, $title, $attributes, FALSE);
}
else {
$output = $path;
}
}
else {
$output = '';
}
}
else {
$output = '';
}
return $output;
}