php7 fixes
[Pman.Builder] / Preview.php
index 6b9b2e0..a636839 100644 (file)
@@ -54,6 +54,10 @@ class Pman_Builder_Preview extends Pman_Cms_Preview
     
     function outputBody()
     {
+        
+        if ($this->timer) {
+            $this->timer->setMarker(__CLASS__ . '::outputBody - start');
+        }
         $ff = HTML_FlexyFramework::get();
         
         
@@ -66,20 +70,32 @@ class Pman_Builder_Preview extends Pman_Cms_Preview
         // needs to modify the template directory??
         // use the builder_module == app name
         // look for part with same name.
-        if (empty($ff->Builder['from_filesystem'])) {
-        
+        if (empty($ff->Pman_Builder['from_filesystem'])) {
+            
             $template_engine = new HTML_Template_Flexy(array(
                 'templateDir' => $m->path
             ));
+        } else {
+            $template_engine = new HTML_Template_Flexy();
         }
+        
+        $template_engine->debug = 1;
+        //print_R($template_engine);
+        
         $template_engine->compile($this->template);
         if ($this->elements) { /* BC crap! */
             $this->elements = HTML_Template_Flexy_Factory::setErrors($this->elements,$this->errors);
         }
         $template_engine->elements = $this->elements;
+        if ($this->timer) {
+            $this->timer->setMarker(__CLASS__ . '::outputBody - render template');
+        }
+        //DB_DataObject::debugLevel(1);
         $template_engine->outputObject($this,$this->elements);
         
-        
+        if ($this->timer) {
+            $this->timer->setMarker(__CLASS__ . '::outputBody - end');
+        }
         
     }
 }
\ No newline at end of file