Construct CSS link markup for the style of all the Widgets contained in the current View.

@return string
513990
public function cmsPageCss()
    {
        $currentView = $this->currentViewHelper->getCurrentView();
        if (!$currentView || !$this->viewCssBuilder->cssFileExists($currentView)) {
            return '<!-- CSS File not found -->';
        }

        return sprintf(
            '<link href="%s" rel="stylesheet" type="text/css" rel="stylesheet"/>',
            $this->viewCssBuilder->getHref($currentView)
        );
    }
939291
protected function _getFromCSS()
    {
        // styles to apply
        $styles = array();

        // list of the selectors to get in the CSS files
        $getit  = array();

        // get the list of the selectors of each tags
        $lst = array();
        $lst[] = $this->value['id_lst'];
        for ($i=count($this->table)-1; $i>=0; $i--) {
            $lst[] = $this->table[$i]['id_lst'];
        }

        // foreach selectors in the CSS files, verify if it match with the list of selectors
        foreach ($this->cssKeys as $key => $num) {
            if ($this->_getReccursiveStyle($key, $lst)) {
                $getit[$key] = $num;
            }
        }

        // if we have selectors
        if (count($getit)) {
            // get them, but in the definition order, because of priority
            asort($getit);
            foreach ($getit as $key => $val) $styles = array_merge($styles, $this->css[$key]);
        }

        return $styles;
    }
385948
public function CMSEditLink() {
        return Controller::join_links(
            Controller::curr()->Link(),
            'EditForm',
            'field',
            $this->ClassName,
            'item',
            $this->ID
        );
    }
936449
public function getCustomCSSAsString()
    {
        // Create CSS Array:
        
        $css = [];
        
        // Merge Custom CSS from Page Controller:
        
        if ($this->owner instanceof PageController) {
            $css = array_merge($css, $this->owner->getCustomCSS());
        }
        
        // Create CSS String:
        
        $css = implode("\n", $css);
        
        // Remove Empty Lines:
        
        $css = ViewTools::singleton()->removeEmptyLines($css);
        
        // Trim CSS String:
        
        $css = trim($css);
        
        // Minify CSS String:
        
        if (!Director::isDev()) {
            $css = ViewTools::singleton()->minifyCSS($css);
        }
        
        // Answer CSS String:
        
        return $css;
    }
1122882
public function forTemplate()
    {
        if ($this->LinkURL) {
            $link = $this->renderWith([
                // Render link with this template if its found. eg Link_button.ss
                Link::class . '_' . $this->Template,
                Link::class
            ]);

            // Legacy. Recommended to use templating above.
            $this->extend('updateLinkTemplate', $this, $link);

            return $link;
        }

        return '';
    }
922136
public function genCss()
    {
        $sizes = [
            'xs' => 'height: 38px; width: 60px;',
            'sm' => 'height: 75px; width: 120px;',
            'md' => 'height: 240px; width: 150px;',
            'lg' => 'height: 480px; width: 300px;',
        ];

        $res = '.pi { display: inline-block;height: 38px;width: 60px; }' . PHP_EOL;

        foreach (array_keys($sizes) as $size) {
            $res .= ".pi.pi-$size { $sizes[$size] }" . PHP_EOL;
        }

        foreach (array_keys($sizes) as $size) {
            foreach ($this->getIconsList() as $name) {
                if ($size === 'xs') {
                    $res .= ".pi.pi-$size.pi-$name, .pi.pi-$name { background: url('../png/$size/$name.png') no-repeat right; }" . PHP_EOL;
                } else {
                    $res .= ".pi.pi-$size.pi-$name { background: url('../png/$size/$name.png') no-repeat right; }" . PHP_EOL;
                }
            }
            $res .= PHP_EOL;
        }

        return $res;
    }
887165
public function buildCode()
    {
        $res = '';
        foreach ($this->styles as $href => $val) {
            $res .= '<link href="' . $href . '" rel="stylesheet" type="text/css" />' . "\r\n";
        }

        return $res;
    }
380448
public function renderSidebar()
    {
        if (!$this->curSubCategories) {
            return '';
        }

        $url = ltrim(wei()->request->getPathInfo(), '/');

        foreach ($this->curSubCategories as $i => $subCategory) {
            foreach ($subCategory['navs'] as $j => $nav) {
                if ($nav['url'] == $url) {
                    $this->curSubCategories[$i]['navs'][$j]['active'] = true;
                }
            }
        }

        return $this->view->render('@admin/admin/sidebar.php', [
            'curSubCategories' => $this->curSubCategories,
        ]);
    }
192199
private function assets()
    {
        $s = '';
        foreach($this->styles as $id=>$f){
            $s .= '<link id="stylesheet_'.$id.'" rel="stylesheet" href="'.$this->url.'css/'.$f.'.css">'."\n\t";
        }
        $this->val('style', $s);

        $s = '<script id="javascript_base">var URL=\''.$this->url.'\'';

        foreach ($this->jsvalues as $n=>$v) {
            $s .= ','.$n.'='.(is_string($v) ? '\''.str_replace("'", '"', $v).'\'' : $v);
        }
        $s .= ';</script>';
        
        foreach($this->scripts as $id=>$f){
            $s .= "\n\t".'<script id="javascript_'.$id.'" src="'.$this->url.'js/'.$f.'.js"></script>';
        }
        $this->val('script', $s); //e($this);
    }
1187906
public function render(): string
    {
        $this->tags();

        if ($this->isLink === true) {
            $this->html .= "<a href=\"{$this->link}\">";
        }

        $element_attributes = '';
        foreach ($this->element_attributes as $attribute => $value) {
            if ($attribute == "color") {
                $element_attributes .= "style=\"{$attribute}: $value\"";
            } else {
                $element_attributes .= "{$attribute}=\"{$value}\" ";
            }
        }

        foreach ($this->tags as $i => $tag) {
            if ($i === 0 && strlen($element_attributes) > 0) {
                $this->html .= "<{$tag} " . rtrim($element_attributes) . '>';
            } else {
                $this->html .= "<{$tag}>";
            }
        }

        $this->html .= $this->escape($this->insert);

        foreach (array_reverse($this->tags) as $tag) {
            $this->html .= "</{$tag}>";
        }

        if ($this->isLink === true) {
            $this->html .= '</a>';
        }

        return $this->html;
    }
300956
protected function getThemeAssistantStylesheet()
	{
		if (!$GLOBALS['objPage'] || !$GLOBALS['objPage']->getRelated('layout')) {
			return null;
		}
		if (!$stylesheets = $GLOBALS['objPage']->getRelated('layout')->external) {
			return null;
		}

		$stylesheets = \StringUtil::deserialize($stylesheets);
		foreach ($stylesheets as $stylesheet) {
			$file = \FilesModel::findByUuid($stylesheet);
			if ($file && $file->path && file_exists(TL_ROOT . '/' . $file->path . '.base')) {
				return $file->path . '.base';
			}
		}

		return null;
	}
1268070
public function renderStyleAssets()
    {
        return implode(
            "\n",
            array_map(
                function ($asset, $parameters) {
                    return '<link rel="' . e(array_get($parameters, 'rel')) . '" href="' . $asset . '"'
                        . (array_get($parameters, 'type') ? ' type="' . e(array_get($parameters, 'type')) . '"' : '')
                        . (array_get($parameters, 'media') ? ' media="' . e(array_get($parameters, 'media')) . '"' : '')
                        . '>';
                },
                array_keys($this->styleAssets),
                array_values($this->styleAssets)
            )
        );
    }
480498
public function getCustomCSS()
    {
        // Create CSS Array:
        
        $css = [];
        
        // Merge Custom CSS from Template:
        
        foreach (ClassTools::singleton()->getObjectAncestry($this, self::class) as $class) {
            
            $template = $this->getCustomCSSTemplate($class);
            
            if (SSViewer::hasTemplate($template)) {
                $css = ViewTools::singleton()->renderCSS($this, $template, $css);
            }
            
        }
        
        // Update CSS via Extensions:
        
        $this->extend('updateCustomCSS', $css);
        
        // Filter CSS Array:
        
        $css = array_filter($css);
        
        // Answer CSS Array:
        
        return $css;
    }
884679
public function fetchCSS()
    {
        $string = "";

        if (empty($this->queuedCSS)) {
            return $string;
        }

        foreach ($this->queuedCSS as $sheet) {
            $string .= '<link rel="stylesheet" href="' . $sheet .'">' . "\r\n";
        }

        return $string;
    }
636977
public function buildHtml()
	{
		$list	= array();
		$divs	= array();
		foreach( $this->steps as $nr => $step )
		{
			$id		= $this->id."_link".$nr;
			$list[]	= UI_HTML_Elements::ListItem( $step['label'], 0, array( 'id' => $id ) );
			$id		= $this->id."_".$nr;
			$divs[] = UI_HTML_Tag::create( 'div', $step['content'], array( 'id' => $id ) );
		}
		$list	= UI_HTML_Elements::unorderedList( $list );
		$divs	= implode( "\n", $divs );
		$div	= UI_HTML_Tag::create( 'div', "\n".$list.$divs."\n", array( 'id' => $this->id ) );
		return $div;
	}
335580
public function getCss()
    {
        if(!$this->includeAssets())
        {
            return '';
        }
        $libraries = $this->getLibrariesInUse();
        $code = '';
        foreach($libraries as $library)
        {
            $code .= $library->getCss() . "\n";
        }
        return $code;
    }
1083349
public function getStyleSheetsHtml()
    {
        $styleSheets = '';
        if (!isset($this->styles)) {
            return $styleSheets;
        }

        foreach ($this->styles as $s) {
            $styleSheets .= '<link rel="stylesheet" type="text/css" href="' . $s . '"/>' . "\n";
        }

        return $styleSheets;
    }