src/Mmi/Mvc/ViewHelper/HeadScript.php
public function setFile($src, $type = 'text/javascript', array $params = [], $prepend = false, $conditional = '')
    {
        //pobieranie timestampu
        $ts = $this->_getLocationTimestamp($src);
        return $this->headScript(array_merge($params, ['type' => $type, 'src' => $ts > 0 ? $this->_getPublicSrc($src) : $src, 'ts' => $ts]), $prepend, $conditional);
    }
public function setFile($src, $type = 'text/javascript', array $params = [], $prepend = false, $conditional = '')
    {
        //pobieranie timestampu
        $ts = $this->_getLocationTimestamp($src);
        return $this->headScript(array_merge($params, ['type' => $type, 'src' => $ts > 0 ? $this->_getPublicSrc($src) : $src, 'ts' => $ts]), $prepend, $conditional);
    }
public function setFile ( $ src , $ type = 'text/javascript' , array $ params = [ ] , $ prepend = false , $ conditional = '' ) { //pobieranie timestampu $ ts = $ this -> _getLocationTimestamp ( $ src ) ; return $ this -> headScript ( array_merge ( $ params , [ 'type' => $ type , 'src' => $ ts > 0 ? $ this -> _getPublicSrc ( $ src ) : $ src , 'ts' => $ ts ] ) , $ prepend , $ conditional ) ; }
Dodaje do stosu skrypt z pliku
@param string $src źródło
@param string $type typ
@param array $params dodatkowe parametry
@param boolean $prepend dodaj na początek stosu
@param string $conditional warunek np. ie6
@return \Mmi\Mvc\ViewHelper\HeadScript
Dodaje do stosu skrypt z pliku