core\Template::render PHP Method

render() public static method

public static render ( )
    public static function render()
    {
        if (self::$viewName) {
            extract(self::$context);
            /** @noinspection PhpIncludeInspection, PhpDeprecationInspection */
            include self::load(self::$viewName);
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Show text and redirect to another page
  * @param string $text Content
  * @param string $link Target page
  * @param int $timeout Time before redirect
  */
 public static function show($text, $link = null, $timeout = 3)
 {
     Template::setView('Misc/Redirect');
     Template::putContext('text', $text);
     Template::putContext('timeout', $timeout);
     Template::putContext('link', $link === null ? null : Response::generateURL($link));
     Filter::preRender();
     Template::render();
     Filter::afterRender();
     exit;
 }
All Usage Examples Of core\Template::render