public function &createBlock($content, $defer = true, $combine = true, $minify = true): JavascriptObjectInterface
    {
        $obj = new JavascriptObject();
        
        $obj->setType($obj::TYPE_BLOCK);
        $obj->setContent($content);
        $obj->setDefer($defer);
        $obj->setCombine($combine);
        $obj->setMinify($minify);
        
        $this->addObject($obj);
        
        return $obj;
    }
public function &createBlock($content, $defer = true, $combine = true, $minify = true): JavascriptObjectInterface
    {
        $obj = new JavascriptObject();
        
        $obj->setType($obj::TYPE_BLOCK);
        $obj->setContent($content);
        $obj->setDefer($defer);
        $obj->setCombine($combine);
        $obj->setMinify($minify);
        
        $this->addObject($obj);
        
        return $obj;
    }
public function & createBlock ( $ content , $ defer = true , $ combine = true , $ minify = true ) : JavascriptObjectInterface { $ obj = new JavascriptObject ( ) ; $ obj -> setType ( $ obj :: TYPE_BLOCK ) ; $ obj -> setContent ( $ content ) ; $ obj -> setDefer ( $ defer ) ; $ obj -> setCombine ( $ combine ) ; $ obj -> setMinify ( $ minify ) ; $ this -> addObject ( $ obj ) ; return $ obj ; }
Blocks with complete code

Use this for conditional scripts!

@param string $content
Objects content
@param boolean $defer
Optional flag to put objects output right before the closing body tag. (Default: true)
@param boolean $combine
Optional flag to switch combining for this object on or off. (Default: true)
@param boolean $minify
Optional flag to switch minifying for this object on or off. (Default: true)
Applies only when $combine argument is set to true.g.

@return JavascriptObjectInterface
Blocks with complete code