function theme_dxpr_gridstack_formatter in DXPR GridStack 7
Implements theme callback function.
1 theme call to theme_dxpr_gridstack_formatter()
- dxpr_gridstack_field_formatter_view in ./
dxpr_gridstack.module - Implements hook_field_formatter_view().
File
- ./
dxpr_gridstack.module, line 185 - Code for the DXPR GridStack feature.
Code
function theme_dxpr_gridstack_formatter($variables) {
$output = '<div class="dxpr-gridstack__img" style="background-image: url(' . $variables['image_url'] . ')"></div>';
if (isset($variables['path']['path'])) {
$path = $variables['path']['path'];
$options = isset($variables['path']['options']) ? $variables['path']['options'] : array();
// When displaying an image inside a link, the html option must be TRUE.
$options['html'] = TRUE;
$output = l($output, $path, $options);
}
return $output;
}