Exemple #1
0
 /**
  * Registers a CSS code block.
  * @param string $css the content of the CSS code block to be registered
  * @param array $options the HTML attributes for the `<style>`-tag.
  * @param string $key the key that identifies the CSS code block. If null, it will use
  * $css as the key. If two CSS code blocks are registered with the same key, the latter
  * will overwrite the former.
  */
 public function registerCss($css, $options = [], $key = null)
 {
     $key = $key ?: md5($css);
     $this->css[$key] = Html::style($css, $options);
 }