public function GTMContainer::variableClean in GoogleTagManager 7.2
Returns a cleansed variable.
Parameters
string $variable: The variable name.
Return value
string The cleansed variable.
4 calls to GTMContainer::variableClean()
- GTMContainer::dataLayerSnippet in includes/
entity/ container.inc - Returns JavaScript data layer snippet or adds items to data layer.
- GTMContainer::environmentQuery in includes/
entity/ container.inc - Returns a query string with the environment parameters.
- GTMContainer::noscriptSnippet in includes/
entity/ container.inc - Returns JavaScript noscript snippet.
- GTMContainer::scriptSnippet in includes/
entity/ container.inc - Returns JavaScript script snippet.
File
- includes/
entity/ container.inc, line 343
Class
- GTMContainer
- Defines the container configuration entity.
Code
public function variableClean($variable) {
return trim(json_encode($this
->get($variable)), '"');
}