Vtiger_Viewer
extends Smarty
in package
Table of Contents
- DEFAULTLAYOUT = 'basic'
- DEFAULTTHEME = 'twilight'
- $completeTemplatePath : string
- $currentLayout : mixed
- $debugViewer : mixed
- $instance : mixed
- __construct() : mixed
- Constructor - Sets the templateDir and compileDir for the Smarty files.
- getDefaultLayoutName() : string
- Function to return for default layout name.
- getInstance() : Vtiger_Viewer
- Static function to get the Instance of the Class Object.
- getLayoutName() : string
- Function to get the current layout name.
- getTemplatePath() : string
- Function to get the module specific template path for a given template.
- view() : string
- Function to display/fetch the smarty file contents.
- log() : mixed
- log message into the file if in debug mode.
Constants
DEFAULTLAYOUT
public
mixed
DEFAULTLAYOUT
= 'basic'
DEFAULTTHEME
public
mixed
DEFAULTTHEME
= 'twilight'
Properties
$completeTemplatePath
public
static string
$completeTemplatePath
Complete template path
$currentLayout
public
static mixed
$currentLayout
$debugViewer
protected
static mixed
$debugViewer
= \false
$instance
protected
static mixed
$instance
= \false
Methods
__construct()
Constructor - Sets the templateDir and compileDir for the Smarty files.
public
__construct([mixed $media = '' ]) : mixed
Parameters
- $media : mixed = ''
Return values
mixed —getDefaultLayoutName()
Function to return for default layout name.
public
static getDefaultLayoutName() : string
Return values
string —- Default Layout Name
getInstance()
Static function to get the Instance of the Class Object.
public
static getInstance([string $media = '' ]) : Vtiger_Viewer
Parameters
- $media : string = ''
-
Layout/Media
Return values
Vtiger_Viewer —instance
getLayoutName()
Function to get the current layout name.
public
static getLayoutName() : string
Return values
string —- Current layout name if not empty, otherwise Default layout name
getTemplatePath()
Function to get the module specific template path for a given template.
public
getTemplatePath(string $templateName[, string $moduleName = '' ]) : string
Parameters
- $templateName : string
- $moduleName : string = ''
Return values
string —- Module specific template path if exists, otherwise default template path for the given template name
view()
Function to display/fetch the smarty file contents.
public
view(string $templateName[, string $moduleName = '' ][, bool $fetch = false ]) : string
Parameters
- $templateName : string
- $moduleName : string = ''
- $fetch : bool = false
Return values
string —html data
log()
log message into the file if in debug mode.
protected
log(type $message[, type $delimiter = '\n' ]) : mixed
Parameters
- $message : type
- $delimiter : type = '\n'