예제 #1
0
 public function beforeRender()
 {
     $menuSource = "";
     foreach ($this->menuEntries as $name => $link) {
         $menuSource .= '<li><a href="' . $link . '">' . $name . '</a></li>';
     }
     TemplateEngine::getInstance()->replaceMarks("menu", $menuSource);
 }
예제 #2
0
 private function __construct()
 {
     $this->classloader = Classloader::getInstance();
     $this->classloader->initLoadLib();
     $this->dataConnector = DataConnector::getInstance();
     $this->routingEngine = RoutingEngine::getInstance();
     $this->templateEngine = TemplateEngine::getInstance();
 }
예제 #3
0
 public static function capitalize($str, $lc_rest = true)
 {
     TemplateEngine::getInstance()->loadPlugin('smarty_modifier_capitalize');
     return smarty_modifier_capitalize($str, false, $lc_rest);
 }
예제 #4
0
 /**
  * Normal render 
  * @param string $view
  */
 public function renderAsHTML($view = 'index')
 {
     $routingEngine = RoutingEngine::getInstance();
     $templateEngine = TemplateEngine::getInstance();
     $templateEngine->loadDesign();
     $templateEngine->loadView($routingEngine->controller, $routingEngine->action);
     $templateEngine->setTitle($routingEngine->controller . ' > ' . $routingEngine->action);
     $templateEngine->render($this);
 }
예제 #5
0
 /**
  * Defines the Title tag
  * @param string $title
  */
 public function setTitle($title)
 {
     $templateEngine = TemplateEngine::getInstance();
     $templateEngine->setTitle($title);
     Log::getInstance()->event("Titel: " . $title, Log::INFO);
 }
예제 #6
0
 public function init()
 {
     Log::getInstance()->event("Loaded my Plugin", Log::INFO);
     TemplateEngine::getInstance()->replaceMarks("info", "Test");
 }