OXID eShop CE
6.1.5
|
Public Member Functions | |
getSmarty ($blReload=false) | |
getTemplateOutput ($templateName, $oObject) | |
passAllErrorsToView (&$aView, $errors) | |
addErrorToDisplay ($oEr, $blFull=false, $useCustomDestination=false, $customDestination="", $activeController="") | |
parseThroughSmarty ($sDesc, $sOxid=null, $oActView=null, $blRecompile=false) | |
setTemplateDir ($templatesDirectory) | |
getTemplateDirs () | |
getTemplateCompileId () | |
getSmartyDir () | |
_smartyDefaultTemplateHandler ($resourceType, $resourceName, &$resourceContent, &$resourceTimestamp, $smarty) | |
getTemplateBlocks ($templateFileName) | |
Protected Member Functions | |
_fillCommonSmartyProperties ($smarty) | |
getShopSmartyPluginDirectories () | |
_smartyCompileCheck ($smarty) | |
_getTemplateBlock ($moduleId, $fileName) | |
_getActiveModuleInfo () | |
addActiveThemeId ($themePath) | |
Protected Attributes | |
$_aTemplateDir = [] | |
$_blIsTplBlocks = null | |
$_aActiveModuleInfo = null | |
Static Protected Attributes | |
static | $_oSmarty = null |
Private Member Functions | |
filterTemplateBlocks ($activeBlockTemplates) | |
formListOfDuplicatedBlocks ($activeBlockTemplates) | |
removeDefaultBlocks ($activeBlockTemplates, $templateBlocksToExchange) | |
removeParentBlocks ($templateBlocks, $templateBlocksToExchange) | |
fillTemplateBlockWithContent ($blockTemplates) | |
isShopTemplateBlockOverriddenByActiveModule () | |
prepareBlockKey ($activeBlockTemplate) | |
getModuleSmartyPluginDirectories () | |
getSmartyPluginDirectoryRepository () | |
getShopIdCalculator () | |
Private Attributes | |
$shopIdCalculator | |
View utility class
|
protected |
sets properties of smarty object
Smarty | $smarty | template processor object (smarty) |
|
protected |
Returns active module Ids
|
protected |
Retrieve module block contents from active module block file.
string | $moduleId | active module id. |
string | $fileName | module block file name. |
oxException | if block is not found |
|
protected |
Sets compile check property to smarty object.
object | $smarty | template processor object (smarty) |
OxidEsales\EshopCommunity\Core\UtilsView::_smartyDefaultTemplateHandler | ( | $resourceType, | |
$resourceName, | |||
& | $resourceContent, | ||
& | $resourceTimestamp, | ||
$smarty | |||
) |
is called when a template cannot be obtained from its resource.
string | $resourceType | template type |
string | $resourceName | template file name |
string | $resourceContent | template file content |
int | $resourceTimestamp | template file timestamp |
object | $smarty | template processor object (smarty) |
|
protected |
Add active theme at the end of theme path to form full path to templates.
string | $themePath |
OxidEsales\EshopCommunity\Core\UtilsView::addErrorToDisplay | ( | $oEr, | |
$blFull = false , |
|||
$useCustomDestination = false , |
|||
$customDestination = "" , |
|||
$activeController = "" |
|||
) |
Adds an 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
StandardException | IDisplayError | string | $oEr | an exception object or just a language local (string), which will be converted into a oxExceptionToDisplay object |
bool | $blFull | if true the whole object is add to display (default false) |
bool | $useCustomDestination | true if the exception shouldn't be displayed at the default position (default false) |
string | $customDestination | defines a name of the view variable containing the messages, overrides Parameter 'CustomError' ("default") |
string | $activeController | defines a name of the controller, which should handle the error. |
|
private |
Fill array with template content or skip if template does not exist. Logs error message if template does not exist.
Example of $activeBlockTemplates:
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_a" "content_a_active"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_b" OXFILE = "x" "content_b_x_default"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_b" OXFILE = "y" "content_b_y_default"
Example of return:
$templateBlocks = [ block_name_a = [ 0 => "content_a_active" ], block_name_c = [ 0 => "content_b_x_default", 1 => "content_b_y_default" ] ]
array | $blockTemplates |
|
private |
Leave only one element for items grouped by fields: OXTEMPLATE and OXBLOCKNAME
Pick only one element from each group if OXTHEME contains (by following priority):
Example of $activeBlockTemplates:
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_a" (group a) OXTHEME = "" "content_a_default"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_a" (group a) OXTHEME = "parent_of_active_theme" "content_a_parent"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_a" (group a) OXTHEME = "active_theme" "content_a_active"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_b" (group b) OXTHEME = "" "content_b_default"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_b" (group b) OXTHEME = "parent_of_active_theme" "content_b_parent"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_c" (group c) OXTHEME = "" OXFILE = "x" "content_c_x_default"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_c" (group c) OXTHEME = "" OXFILE = "y" "content_c_y_default"
Example of return:
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_a" (group a) OXTHEME = "active_theme" "content_a_active"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_b" (group b) OXTHEME = "parent_of_active_theme" "content_b_parent"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_c" (group c) OXTHEME = "" OXFILE = "x" "content_c_x_default"
OXTEMPLATE = "requested_template_name.tpl" OXBLOCKNAME = "block_name_c" (group c) OXTHEME = "" OXFILE = "y" "content_c_y_default"
array | $activeBlockTemplates | list of template blocks with all parameters. |
|
private |
Form list of blocks which has duplicates for specific theme.
array | $activeBlockTemplates |
|
private |
|
private |
|
protected |
OxidEsales\EshopCommunity\Core\UtilsView::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.
bool | $blReload | set true to force smarty reload |
OxidEsales\EshopCommunity\Core\UtilsView::getSmartyDir | ( | ) |
Returns a full path to Smarty compile dir
|
private |
OxidEsales\EshopCommunity\Core\UtilsView::getTemplateBlocks | ( | $templateFileName | ) |
Template blocks getter: retrieve sorted blocks for overriding in templates
string | $templateFileName | filename of rendered template |
OxidEsales\EshopCommunity\Core\UtilsView::getTemplateCompileId | ( | ) |
Get template compile id.
OxidEsales\EshopCommunity\Core\UtilsView::getTemplateDirs | ( | ) |
Initializes and returns templates directory info array
OxidEsales\EshopCommunity\Core\UtilsView::getTemplateOutput | ( | $templateName, | |
$oObject | |||
) |
Returns rendered template output. According to debug configuration outputs debug information.
string | $templateName | template file name |
object | $oObject | object, witch template we wish to output |
|
private |
Check if at least one active module overrides at least one template (in active shop). To win performance when:
OxidEsales\EshopCommunity\Core\UtilsView::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
mixed | $sDesc | description or array of descriptions (array( [] => array(ident, value_to_process))) |
string | $sOxid | current object id |
\OxidEsales\Eshop\Core\Controller\BaseController | $oActView | view data to use its view data (optional) |
bool | $blRecompile | force to recompile if found in cache |
OxidEsales\EshopCommunity\Core\UtilsView::passAllErrorsToView | ( | & | $aView, |
$errors | |||
) |
adds the given errors to the view array
array | $aView | view data array |
array | $errors | array of errors to pass to view |
|
private |
Prepare indicator for template block. This indicator might be used to identify same template block for different theme.
array | $activeBlockTemplate |
|
private |
Remove default blocks whose have duplicate for specific theme.
array | $activeBlockTemplates | |
array | $templateBlocksToExchange |
|
private |
Remove parent theme blocks whose have duplicate for custom theme.
array | $templateBlocks | |
array | $templateBlocksToExchange |
OxidEsales\EshopCommunity\Core\UtilsView::setTemplateDir | ( | $templatesDirectory | ) |
Templates directory setter
string | $templatesDirectory | templates path |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
private |