core/web/Element.php
public function render($file, array $args = [])
    {
        $view = new View();
        $view->autoRegisterCsrf = false;
        return $view->renderPhpFile(rtrim($this->getFolder(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . FileHelper::ensureExtension($file, 'php'), $args);
    }
public function render($file, array $args = [])
    {
        $view = new View();
        $view->autoRegisterCsrf = false;
        return $view->renderPhpFile(rtrim($this->getFolder(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . FileHelper::ensureExtension($file, 'php'), $args);
    }
public function render ( $ file , array $ args = [ ] ) { $ view = new View ( ) ; $ view -> autoRegisterCsrf = false ; return $ view -> renderPhpFile ( rtrim ( $ this -> getFolder ( ) , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . FileHelper :: ensureExtension ( $ file , 'php' ) , $ args ) ; }
Method to render twig files with theyr specific arguments, can be used inside the element closure depending
on where the closure was registered. Otherwhise the use of the element variable must be provided.

@param string $file The name of the file to render.
@param array  $args The parameters to pass in the render file.

@return string The render value of the view file.
Method to render twig files with theyr specific arguments can be used inside the element closure depending on where the closure was registered . Otherwhise the use of the element variable must be provided .