Example #1
0
function app_event_test_view($values)
{
    global $config;
    //
    //rea_views::setViewsPath( REA_SELF_DIRECTORY );
    $page = rea_views::default_view("bootstrap.view");
    $page->set("title", "Testin Views");
    $page->body->write("<p>Welcome to REASG</p>");
    //For this example lets override where we look for views and templates
    //in a regular setup we do not need to do this if our files are in the views folder
    rea_views::setViewsPath(REA_SELF_DIRECTORY);
    $view_name = isset($values['view']) ? $values['view'] : 'view_test3';
    $view = rea_view::create($view_name);
    //$view->body->write("this is the body<br>");
    //$out = $view->getHTML();
    //print htmlentities($out);
    $page->body->write($view);
}
Example #2
0
 public function getHTML()
 {
     $html = parent::getHTML();
     return $html;
 }
Example #3
0
 public static function createWithSource($name, $src, $basePath = REA_SELF_DIRECTORY)
 {
     $a = new rea_view();
     $a->name = str_replace('.', '_', $name);
     $a->initializeSource(self::getSourceWithIncludes($src, $basePath));
     return $a;
 }