Esempio n. 1
0
 private function execTemplate($resourceId, $tplName, $tplVariant, array $pageMeta = null)
 {
     $unitCode = $this->makeTemplateCode($tplName, $tplVariant);
     $unit = $this->themeAssistant->loadUnitFromCache($resourceId, $unitCode);
     if (isset($unit)) {
         return $this->innerApp->toPage($unit);
     }
     $tplMeta = null;
     $tplTool = new TemplateTool($this->innerApp, $this, $resourceId, $tplMeta, $pageMeta);
     $filePath = $this->dir . '/' . $tplName . '.php';
     //echo "=== $filePath\n";
     ob_start();
     execTemplate($filePath, $tplTool, $tplVariant);
     $content = ob_get_contents();
     ob_end_clean();
     // TODO try catch errors
     return $this->themeAssistant->makeUnit($resourceId, $unitCode, $content, $this->innerApp->CurQuery, $tplMeta);
 }
Esempio n. 2
0
 public function getApplicationService($serviceName)
 {
     return $this->inner->getApplicationService($serviceName, $this->inner->Tool);
 }