Ejemplo n.º 1
0
 /**
  * Registers a CSS file.
  * @param string $url the CSS file to be registered.
  * @param array $options the HTML attributes for the link tag.
  * @param string $key the key that identifies the CSS script file. If null, it will use
  *                        $url as the key. If two CSS files are registered with the same key, the latter
  *                        will overwrite the former.
  */
 public function registerCssFile($url, $options = [], $key = null)
 {
     $key = $key ?: $url;
     if (is_array($key)) {
         $key = current($key);
     }
     $position = isset($options['position']) ? $options['position'] : self::POS_HEAD;
     unset($options['position']);
     $this->cssFiles[$position][$key] = $this->renderWrapperTag(Html::cssFile($url, $options), $options);
 }