UtilViewHelper
extends ViewHelper
in package
This is the UtilViewHelper class.
The purpose of this class is to facilitate to Twig the generation of view output (providing some useful methods).
This class extends ViewHelper, see this class.
Tags
Table of Contents
$languageSheet | : Language|null | |
---|---|---|
$session | : Session|null | |
$theme | : Theme|null | |
__construct() | : mixed | |
agencyLogoMacro() | This method merges the given arguments, calculates and returns the view parameters for the agencyLogo macro. | : array<string|int, mixed> |
breadcrumbMacro() | This method merges the given arguments, calculates and returns the view parameters for the breadcrumb macro. | : array<string|int, mixed> |
coreJsEnvironmentVariables() | This method merges the given arguments, calculates and returns the view parameters for the coreJsEnvironmentVariables macro. | : array<string|int, mixed> |
fillDataFunction() | This method merges the given arguments, calculates and returns the view parameters for the fillDataFunction macro. | : array<string|int, mixed> |
getApplicationTaxesIncluded() | This method returns the setting of 'show taxes included'. | : bool |
getPriceDifference() | This method gets the price difference between the given basePrice and the given retailPrice and returns it in an array with these keys: <ul> <li>priceDifference</li> <li>percentDifference</li> <li>roundedPercentDifference</li> </ul> | : array<string|int, mixed> |
mergeArguments() | This method merges macro arguments with macro associated class properties by reference. | : void |
paginationMacro() | This method merges the given arguments, calculates and returns the view parameters for the pagination macro. | : array<string|int, mixed> |
physicalLocations() | This method merges the given arguments, calculates and returns the view parameters for the physicalLocations macro. | : array<string|int, mixed> |
physicalLocationsFilter() | This method merges the given arguments, calculates and returns the view parameters for the physicalLocationsFilter macro. | : array<string|int, mixed> |
physicalLocationsForm() | This method merges the given arguments, calculates and returns the view parameters for the physicalLocationsForm macro. | : array<string|int, mixed> |
pluginsAssetsMacro() | This method merges the given arguments, calculates and returns the view parameters for the pluginsAssets macro. | : array<string|int, mixed> |
printableContentMacro() | This method merges the given arguments, calculates and returns the view parameters for the printableContent macro. | : array<string|int, mixed> |
searchFormMacro() | This method merges the given arguments, calculates and returns the view parameters for the searchForm macro. | : array<string|int, mixed> |
trackersMacro() | This method merges the given arguments, calculates and returns the view parameters for the trackers macro. | : array<string|int, mixed> |
viewSection() | This method merges the given arguments, calculates and returns the view parameters for the viewSection macro. | : array<string|int, mixed> |
Properties
$languageSheet
protected
Language|null
$languageSheet
= null
$session
protected
Session|null
$session
= null
$theme
protected
Theme|null
$theme
= null
Methods
__construct()
public
__construct(Language $languageSheet, Theme $theme, Session|null $session) : mixed
Parameters
Return values
mixed —agencyLogoMacro()
This method merges the given arguments, calculates and returns the view parameters for the agencyLogo macro.
public
agencyLogoMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- type
- color
- showOnlyText
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —breadcrumbMacro()
This method merges the given arguments, calculates and returns the view parameters for the breadcrumb macro.
public
breadcrumbMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- showHome
- showArea
- maxLevels
- tag
- data
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —coreJsEnvironmentVariables()
This method merges the given arguments, calculates and returns the view parameters for the coreJsEnvironmentVariables macro.
public
coreJsEnvironmentVariables([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- user
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —fillDataFunction()
This method merges the given arguments, calculates and returns the view parameters for the fillDataFunction macro.
public
fillDataFunction([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- user
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —getApplicationTaxesIncluded()
This method returns the setting of 'show taxes included'.
public
static getApplicationTaxesIncluded() : bool
Return values
bool —getPriceDifference()
This method gets the price difference between the given basePrice and the given retailPrice and returns it in an array with these keys: <ul> <li>priceDifference</li> <li>percentDifference</li> <li>roundedPercentDifference</li> </ul>
public
getPriceDifference(float $basePrice, float $retailPrice, int $roundDecimals) : array<string|int, mixed>
Parameters
- $basePrice : float
- $retailPrice : float
- $roundDecimals : int
Return values
array<string|int, mixed> —mergeArguments()
This method merges macro arguments with macro associated class properties by reference.
public
static mergeArguments(mixed &$classObject[, array<string|int, mixed> $arguments = [] ]) : void
Parameters
- $classObject : mixed
- $arguments : array<string|int, mixed> = []
Return values
void —paginationMacro()
This method merges the given arguments, calculates and returns the view parameters for the pagination macro.
public
paginationMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- pagination
- pagerParameters
- paginationItems
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —physicalLocations()
This method merges the given arguments, calculates and returns the view parameters for the physicalLocations macro.
public
physicalLocations([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- changeOptionFunction
- physicalLocations
- addCountrySelector
- addStateSelector
- addCitySelector
- addPostalCodeSelector
- addAllOption
- showInMap
- mapsApiKey
- optionName
- optionClass
- defaultPhysicalLocationId
- showDirections
- physicalLocationFields
- showPlacesAutocomplete
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —physicalLocationsFilter()
This method merges the given arguments, calculates and returns the view parameters for the physicalLocationsFilter macro.
public
physicalLocationsFilter([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- physicalLocationsFilter
- countries
- defaultCountry
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —physicalLocationsForm()
This method merges the given arguments, calculates and returns the view parameters for the physicalLocationsForm macro.
public
physicalLocationsForm([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- form
- levels
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —pluginsAssetsMacro()
This method merges the given arguments, calculates and returns the view parameters for the pluginsAssets macro.
public
pluginsAssetsMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- assets
- pageType
- ambience
- position
- type
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —printableContentMacro()
This method merges the given arguments, calculates and returns the view parameters for the printableContent macro.
public
printableContentMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- windowAttributes
- content
- hrefType
- title
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —searchFormMacro()
This method merges the given arguments, calculates and returns the view parameters for the searchForm macro.
public
searchFormMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- form
- showLabel
- showPlaceholder
- searchByCustomTags
- useSuggest
- minCharacters
- searchProducts
- searchCategories
- searchBlog
- searchPages
- searchNews
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —trackersMacro()
This method merges the given arguments, calculates and returns the view parameters for the trackers macro.
public
trackersMacro([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- trackers
- pageType
- ambience
- position
- type
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments
Return values
array<string|int, mixed> —viewSection()
This method merges the given arguments, calculates and returns the view parameters for the viewSection macro.
public
viewSection([array<string|int, mixed> $arguments = [] ]) : array<string|int, mixed>
The array keys of the returned parameters are:
- user
Parameters
- $arguments : array<string|int, mixed> = []
-
Twig macro arguments