public function addScript($src, $async = false, $bottom = false)
    {
        // Build the script element
        $script = $this->getHTMLFactory()->buildScript($src, $async);

        // Choose to append to head or to bottom scripts
        if ($bottom) {
            $this->addToBottomScripts($script);
        } else {
            $this->appendToHead($script);
        }

        // Return the script element
        return $script;
    }
public function addScript($src, $async = false, $bottom = false)
    {
        // Build the script element
        $script = $this->getHTMLFactory()->buildScript($src, $async);

        // Choose to append to head or to bottom scripts
        if ($bottom) {
            $this->addToBottomScripts($script);
        } else {
            $this->appendToHead($script);
        }

        // Return the script element
        return $script;
    }
public function addScript ( $ src , $ async = false , $ bottom = false ) { // Build the script element $ script = $ this -> getHTMLFactory ( ) -> buildScript ( $ src , $ async ) ; // Choose to append to head or to bottom scripts if ( $ bottom ) { $ this -> addToBottomScripts ( $ script ) ; } else { $ this -> appendToHead ( $ script ) ; } // Return the script element return $ script ; }
Inserts a script line.

@param string $src    The URL source file of the script.
@param bool   $async  Set the async attribute to script tag.
It is FALSE by default.
@param bool   $bottom Indicator whether the script tag will be placed at the bottom of the page.
The default value is FALSE.

@return HTMLElement
@throws InvalidArgumentException
Inserts a script line .