function smartyLoadStylesheet($params, $smarty)
{
if (empty($params['stylesheets'])) {
return;
}
if (empty($params['context'])) {
$context = 'frontend';
}
$stylesheets = $this->getResourcesByContext($params['stylesheets'], $params['context']);
$output = '';
foreach ($stylesheets as $priorityList) {
foreach ($priorityList as $style) {
if (!empty($style['inline'])) {
$output .= '<style type="text/css">' . $style['style'] . '</style>';
} else {
$output .= '<link rel="stylesheet" href="' . $style['style'] . '" type="text/css" />';
}
}
}
return $output;
}