Пример #1
0
 /**
  * Sets a javascript asset into the HeadScript or InlineScript
  * @param HeadScript $element
  * @param array $js
  */
 private function setJavascript(HeadScript $element, array $js = array())
 {
     $jsPath = $this->options->getJs()->getPath();
     if (isset($js["options"])) {
         $element->appendFile($jsPath . "/" . $js["name"], "text/javascript", $js["options"]);
     } else {
         $element->appendFile($jsPath . "/" . $js["name"]);
     }
 }
Пример #2
0
 public function testAssetsArraysAreUnchanged()
 {
     $this->assertEquals($this->config['css']['stylesheets'], $this->options->getCss()->getStylesheets());
     $this->assertEquals($this->config['js']['inline'], $this->options->getJs()->getInline());
     $this->assertEquals($this->config['js']['head'], $this->options->getJs()->getHead());
 }