Browse Source

allow setting css rel explicitly

used e.g. for less client side compiling
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
3a613e8565
  1. 4
      framework/yii/helpers/BaseHtml.php

4
framework/yii/helpers/BaseHtml.php

@ -191,7 +191,9 @@ class BaseHtml
*/ */
public static function cssFile($url, $options = []) public static function cssFile($url, $options = [])
{ {
$options['rel'] = 'stylesheet'; if (!isset($options['rel'])) {
$options['rel'] = 'stylesheet';
}
$options['href'] = static::url($url); $options['href'] = static::url($url);
return static::tag('link', '', $options); return static::tag('link', '', $options);
} }

Loading…
Cancel
Save