Webiny\Component\Bootstrap\ApplicationClasses\View::setAutoload PHP Method

setAutoload() public method

Set the view template auto load.
public setAutoload ( boolean $autoload )
$autoload boolean Should the view template file be auto loaded or not.
    public function setAutoload($autoload)
    {
        $this->autoloadViewTemplate = $autoload;
    }

Usage Example

Example #1
0
 public function testSetGetAutload()
 {
     $view = new View();
     $this->assertTrue($view->getAutoload());
     $view->setAutoload(false);
     $this->assertFalse($view->getAutoload());
 }