Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • Contenido_Backend_SmartyWrapper
  • Contenido_SmartyWrapper
  • cSmartyBackend
  • cSmartyFrontend
  • cSmartyWrapper
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the wrapper class for smarty wrapper plugin.
 4:  *
 5:  * @package Plugin
 6:  * @subpackage SmartyWrapper
 7:  * @version SVN Revision $Rev:$
 8:  *
 9:  * @author Andreas Dieter
10:  * @copyright four for business AG <www.4fb.de>
11:  * @license http://www.contenido.org/license/LIZENZ.txt
12:  * @link http://www.4fb.de
13:  * @link http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Wrapper class for Integration of smarty.
20:  *
21:  * @package Plugin
22:  * @subpackage SmartyWrapper
23:  */
24: class cSmartyWrapper extends Smarty {
25: 
26:     /**
27:      *
28:      * @see Smarty_Internal_TemplateBase::fetch()
29:      */
30:     public function fetch($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL, $display = false, $merge_tpl_vars = true, $no_output_filter = false) {
31:         if ($this->templateExists($template) === false) {
32:             $moduleId = (int) cRegistry::getCurrentModuleId();
33:             if ($moduleId > 0) {
34:                 $module = new cModuleHandler($moduleId);
35:                 $template = $module->getTemplatePath($template);
36:             }
37:         }
38: 
39:         return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
40:     }
41: 
42:     /**
43:      *
44:      * @see Smarty_Internal_TemplateBase::fetch()
45:      */
46:     public function fetchGeneral($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL, $display = false, $merge_tpl_vars = true, $no_output_filter = false) {
47:         $template = cRegistry::getFrontendPath() . 'templates/' . $template;
48: 
49:         return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
50:     }
51: 
52:     public function display($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL) {
53:         global $frontend_debug;
54: 
55:         if ($frontend_debug['template_display']) {
56:             echo("<!-- SMARTY TEMPLATE " . $template . " -->");
57:         }
58: 
59:         return parent::display($template, $cache_id, $compile_id, $parent);
60:     }
61: 
62:     /**
63:      *
64:      * @see Smarty_Internal_TemplateBase::display()
65:      */
66:     public function displayGeneral($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL) {
67:         $this->fetchGeneral($template, $cache_id, $compile_id, $parent, true);
68:     }
69: 
70: }
CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0