PKPTemplateManager::smartyLoadStylesheet PHP Method

smartyLoadStylesheet() public method

Custom Smarty function for printing stylesheets attached to a context.
public smartyLoadStylesheet ( $params, $smarty ) : string
$params array associative array
$smarty Smarty
return string of HTML/Javascript
    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;
    }