Efficiently\Larasset\Asset::stylesheetLinkTag PHP Метод

stylesheetLinkTag() публичный Метод

Returns a HTML stylesheet link tag for the sources and attributes specified as arguments.
public stylesheetLinkTag ( array | string $sources = "application", array $attributes = [] ) : string
$sources array | string default "application"
$attributes array HTML attributes
Результат string
    public function stylesheetLinkTag($sources = "application", $attributes = [])
    {
        // E.g. stylesheet_link_tag('app', ['media'=>'all']); => app-fa2ce4b45369a106436f229ca9e52bee.css
        $args = func_get_args();
        if (is_array(last($args))) {
            $attributes = array_pop($args);
        } else {
            $attributes = [];
        }
        $sources = is_array($sources) ? $sources : $args;
        if (empty($sources)) {
            $sources = ["application"];
        }
        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];
        $defaults = ['media' => 'all', 'type' => 'text/css'];
        $attributes = $attributes + $defaults;
        $stylesheet_tags = [];
        foreach ((array) $sources as $source) {
            $sourceName = "{$source}.css";
            $stylesheet_tags[] = app('html')->style($this->assetPath($sourceName, $assetsOptions), $attributes);
        }
        return implode($stylesheet_tags);
    }