OXID eShop CE  4.8.11
 All Classes Files Functions Variables Pages
oxUtilsView Class Reference
+ Inheritance diagram for oxUtilsView:
+ Collaboration diagram for oxUtilsView:

Public Member Functions

 getSmarty ($blReload=false)
 getTemplateOutput ($sTemplate, $oObject)
 passAllErrorsToView (&$aView, $aErrors)
 addErrorToDisplay ($oEr, $blFull=false, $blCustomDestination=false, $sCustomDestination="", $sActiveController="")
 parseThroughSmarty ($sDesc, $sOxid=null, $oActView=null, $blRecompile=false)
 setTemplateDir ($sTplDir)
 getTemplateDirs ()
 getTemplateCompileId ()
 getSmartyDir ()
 _smartyDefaultTemplateHandler ($sResourceType, $sResourceName, &$sResourceContent, &$sResourceTimestamp, $oSmarty)
 getTemplateBlocks ($sFile)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Static Public Member Functions

static getInstance ()

Protected Member Functions

 _fillCommonSmartyProperties ($oSmarty)
 _smartyCompileCheck ($oSmarty)
 _getTemplateBlock ($sModule, $sFile)
 _getActiveModuleInfo ()

Protected Attributes

 $_aTemplateDir = array()
 $_blIsTplBlocks = null
 $_aActiveModuleInfo = null

Static Protected Attributes

static $_oSmarty = null
- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Static Private Attributes

static $_instance = null

Detailed Description

View utility class

Definition at line 6 of file oxutilsview.php.

Member Function Documentation

oxUtilsView::_fillCommonSmartyProperties (   $oSmarty)
protected

sets properties of smarty object

Parameters
object$oSmartytemplate processor object (smarty)
Returns
null

Definition at line 339 of file oxutilsview.php.

oxUtilsView::_getActiveModuleInfo ( )
protected

Returns active module Ids

Returns
array

Definition at line 528 of file oxutilsview.php.

oxUtilsView::_getTemplateBlock (   $sModule,
  $sFile 
)
protected

retrieve module block contents

Parameters
string$sModulemodule name
string$sFilemodule block file name without .tpl ending
See Also
getTemplateBlocks
Exceptions
oxExceptionif block is not found
Returns
string

Definition at line 440 of file oxutilsview.php.

oxUtilsView::_smartyCompileCheck (   $oSmarty)
protected

sets compile check property to smarty object

Parameters
object$oSmartytemplate processor object (smarty)
Returns
null

Definition at line 399 of file oxutilsview.php.

oxUtilsView::_smartyDefaultTemplateHandler (   $sResourceType,
  $sResourceName,
$sResourceContent,
$sResourceTimestamp,
  $oSmarty 
)

is called when a template cannot be obtained from its resource.

Parameters
string$sResourceTypetemplate type
string$sResourceNametemplate file name
string&$sResourceContenttemplate file content
int&$sResourceTimestamptemplate file timestamp
object$oSmartytemplate processor object (smarty)
Returns
bool

Definition at line 417 of file oxutilsview.php.

oxUtilsView::addErrorToDisplay (   $oEr,
  $blFull = false,
  $blCustomDestination = false,
  $sCustomDestination = "",
  $sActiveController = "" 
)

adds a exception to the array of displayed exceptions for the view by default is displayed in the inc_header, but with the custom destination set to true the exception won't be displayed by default but can be displayed where ever wanted in the tpl

Parameters
exception$oEra exception object or just a language local (string) which will be converted into a oxExceptionToDisplay object
bool$blFullif true the whole object is add to display (default false)
bool$blCustomDestinationtrue if the exception shouldn't be displayed at the default position (default false)
string$sCustomDestinationdefines a name of the view variable containing the messages, overrides Parameter 'CustomError' ("default")
string$sActiveControllerdefines a name of the controller, which should handle the error.
Returns
null

Definition at line 137 of file oxutilsview.php.

static oxUtilsView::getInstance ( )
static

Utility instance getter

Deprecated:
since v5.0 (2012-08-10); Use oxRegistry::get("oxUtilsView") instead.
Returns
oxUtilsView

Definition at line 50 of file oxutilsview.php.

oxUtilsView::getSmarty (   $blReload = false)

returns existing or creates smarty object Returns smarty object. If object not yet initiated - creates it. Sets such default parameters, like cache lifetime, cache/templates directory, etc.

Parameters
bool$blReloadset true to force smarty reload
Returns
smarty

Definition at line 64 of file oxutilsview.php.

oxUtilsView::getSmartyDir ( )

Returns a full path to Smarty compile dir

Returns
string

Definition at line 314 of file oxutilsview.php.

oxUtilsView::getTemplateBlocks (   $sFile)

template blocks getter: retrieve sorted blocks for overriding in templates

Parameters
string$sFilefilename of rendered template
See Also
smarty_prefilter_oxblock
Returns
array

Definition at line 469 of file oxutilsview.php.

oxUtilsView::getTemplateCompileId ( )

Get template compile id.

Returns
string

Definition at line 301 of file oxutilsview.php.

oxUtilsView::getTemplateDirs ( )

Initializes and returns templates directory info array

Returns
array

Definition at line 281 of file oxutilsview.php.

oxUtilsView::getTemplateOutput (   $sTemplate,
  $oObject 
)

Returns rendered template output. According to debug configuration outputs debug information.

Parameters
string$sTemplatetemplate file name
object$oObjectobject, witch template we wish to output
Returns
string

Definition at line 84 of file oxutilsview.php.

oxUtilsView::parseThroughSmarty (   $sDesc,
  $sOxid = null,
  $oActView = null,
  $blRecompile = false 
)

Runs long description through smarty. If you pass array of data to process, array will be returned, if you pass string - string will be passed as result

Parameters
mixed$sDescdescription or array of descriptions ( array( [] => array( ident, value_to_process ) ) )
string$sOxidcurrent object id
oxview$oActViewview data to use its view data (optional)
bool$blRecompileforce to recompile if found in cache
Returns
mixed

Definition at line 209 of file oxutilsview.php.

oxUtilsView::passAllErrorsToView ( $aView,
  $aErrors 
)

adds the given errors to the view array

Parameters
array&$aViewview data array
array$aErrorsarray of errors to pass to view
Returns
null

Definition at line 113 of file oxutilsview.php.

oxUtilsView::setTemplateDir (   $sTplDir)

Templates directory setter

Parameters
string$sTplDirtemplates path
Returns
null

Definition at line 269 of file oxutilsview.php.

Member Data Documentation

oxUtilsView::$_aActiveModuleInfo = null
protected

Definition at line 41 of file oxutilsview.php.

oxUtilsView::$_aTemplateDir = array()
protected

Definition at line 27 of file oxutilsview.php.

oxUtilsView::$_blIsTplBlocks = null
protected

Definition at line 34 of file oxutilsview.php.

oxUtilsView::$_instance = null
staticprivate

Definition at line 13 of file oxutilsview.php.

oxUtilsView::$_oSmarty = null
staticprotected

Definition at line 20 of file oxutilsview.php.


The documentation for this class was generated from the following file: