Usage: {asset_css refs='' attrs=[] group='' raw=false}
Required: refs

@return mixed string or nothing if group is filled
767043
public function asset_css($params) {
        if (!isset($params['refs'])) {
            throw new \UnexpectedValueException("The refs parameter is required.");
        }
        $group = isset($params['group']) ? $params['group'] : null;
        $attrs = isset($params['attrs']) ? $params['attrs'] : array();
        $raw = isset($params['raw']) ? $params['raw'] : false;
        return Asset::css($params['refs'], $attrs, $group, $raw);
    }
1140491
public function getCssCode()
    {
        $html = '';
        foreach ($this->css as $css) {
            $html .= sprintf('<link rel="stylesheet" href="%s"/>', $css);
        }
        return $html;
    }
323725
private function prepareAssets()
	{
		$lib = $this;
		$attached_groups = $this->getAttachedGroups();
		array_walk($lib->attached_groups, function($group_name) use($lib){
			$groups = $lib->getGroups();
			$group_contents = $groups[$group_name];
			array_walk($group_contents, function($value, $key) use($lib, $group_name){
				switch($key)
				{
					case 'css':
					array_walk($value, function($value, $key) use($lib, $group_name){
						$lib->registerCss($group_name.'/'.$value,$group_name);
					});
					break;
					case 'js':
					array_walk($value, function($value, $key) use($lib, $group_name){
						$lib->registerJs($group_name.'/'.$value,$lib->getOption('jsPosition'),$group_name);
					});
					break;
				}
			});
		});
		return $this;
	}
743140
public function getAssetUrl($raw = false)
    {
        if ($this->assetUrl === null) {
            $this->assetUrl = Yii::$app->assetManager->publish(
                $this->getBasePath() . '/' . $this->distDir
            );
        }
        return $raw ? $this->assetUrl : $this->assetUrl[1];
    }
1304422
static public function cssVer() {
        static $ver = '';
        if (!$ver) {
            $conf = new \Yaf_Config_Ini(ROOTPATH . '/config/env.ini');
            $ver = $conf->version->css;
        }
        return $ver;
    }
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);
    }
451890
public function getStylesAttribute()
    {
        if (!$this->isImage)
            return null;

        $styles = [];
        foreach ($this->image_styles as $style)
            $styles[$style->style->name] = $style->file;

        return $styles;
    }
284680
public function getAssets()
    {
        $css = $this->theme->getThemeInfoExtendAware('css');
        $js = $this->theme->getThemeInfoExtendAware('javascript');

        return [
            'css' => $css,
            'javascript' => $js,
        ];
    }
972335
protected function getAttributesCSS(array $attr)
    {
        $output = [];
        foreach ($attr as $key => $values) {
            if (in_array($key, $this->attributesCss) && $values !== '') {
                $output[] = $key . '="' . $values . '"';
            }
        }
        $implode = implode(' ', $output);

        return $implode
            ? " $implode"
            : '';
    }
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;
    }
519884
public function getStyleAttributeArray(): array
    {
        $value = $this->getAttribute('style')['value'];

        if ($value === null) {
            return [];
        }

        $value = explode(';', substr(trim($value), 0, -1));
        $result = [];
        foreach ($value as $attr) {
            $attr = explode(':', $attr);
            $result[$attr[0]] = $attr[1];
        }

        return $result;
    }
142627
protected function group($group)
    {
        if ( ! isset($this->assets[$group]) or count($this->assets[$group]) == 0) return '';

        $assets = '';

        foreach ($this->arrange($this->assets[$group]) as $name => $data)
        {
            $assets .= $this->asset($group, $name);
        }

        return $assets;
    }
485950
public function getCssFiles()
	{
		//$return = array();
		//$return = $this->cssFiles;
		$return = '';		
		//print_r($this->cssFiles);
		if(!empty($this->cssFiles)) {
			foreach($this->cssFiles as $key=>$val) {
				if((is_string($key)) || is_array($val))
					if($key == $row)
						$cssFile = $this->getProtocol()."://".Yii::app()->request->serverName.$key;
					$return .= '@import url("'.$cssFile.'");';
			}
		}
		
		//$return = $this->coreScripts;
		//print_r($this->coreScripts);
		if(!empty($this->coreScripts)) {
			foreach($this->coreScripts as $key=>$val) {
				if((is_string($key) && $key != 'jquery') && is_array($val)) {
				//if((is_string($key)) && is_array($val))
					if($val['css'] != null && $val['baseUrl'] != null)
						$cssFile = $this->getProtocol()."://".Yii::app()->request->serverName.$val['baseUrl'].'/'.$val['css'][0];
					$return .= '@import url("'.$cssFile.'");';
				}
			}
		}
		return $return;
	}
1327152
public function getStyle(): string
    {
        $values = $this->options;
        if ($this->bgColor > 0) {
            array_unshift($values, $this->bgColor);
        }

        if ($this->fgColor > 0) {
            array_unshift($values, $this->fgColor);
        }

        return implode(';', $values);
    }
205360
public function getRenderedReasonAttribute() : ?string
    {
        if ($this->renderedReason !== null) {
            return $this->renderedReason;
        }

        if ($this->config->get('laranixauth.cage.save_rendered', true) &&
            ($rendered = $this->getAttributeFromArray('reason_rendered')) !== null) {
            return $this->renderedReason = $rendered;
        }

        if (($raw = $this->getAttributeFromArray('reason')) !== null) {
            return $this->renderedReason = markdown($raw);
        }

        return null;
    }
859045
public function getStyles(): string
    {
        $str = '';

        if(isset($this->styles))
            foreach($this->styles as $style)
                if(isset($style['content']))
                    $str .= '<style type="'.$style['type'].'">'.$style['content'].'</style>';
                elseif(isset($style['href']))
                    $str .= '<link rel="'.$style['rel'].'" type="'.$style['type'].'" href="'.$style['href'].'"'.(($style['defer']) ? ' defer async' : '').' />';
                elseif(isset($style['raw']))
                    $str .= $style['raw'];

        return $str;
    }
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;
    }