Content
extends AbstractHelper
in package
Content View Helper to resolve translated pages.
This is basically a wrapper around the PageLocator.
Tags
Table of Contents
- $contextHelper : Context
- Context View Helper instance to resolve translated pages.
- $templateBasedBlock : TemplateBased
- TemplateBased instance to resolve translated pages.
- __construct() : mixed
- Constructor
- renderTranslated() : string
- Search for a translated template and render it using a temporary context.
Properties
$contextHelper
Context View Helper instance to resolve translated pages.
protected
Context
$contextHelper
$templateBasedBlock
TemplateBased instance to resolve translated pages.
protected
TemplateBased
$templateBasedBlock
Methods
__construct()
Constructor
public
__construct(TemplateBased $block, Context $contextHelper) : mixed
Parameters
- $block : TemplateBased
-
TemplateBased ContentBlock
- $contextHelper : Context
-
Context view helper
Return values
mixed —renderTranslated()
Search for a translated template and render it using a temporary context.
public
renderTranslated(string $pageName[, string $pathPrefix = 'content' ][, array<string|int, mixed> $context = [] ][, array<string|int, mixed> &$pageDetails = [] ][, string $pattern = null ]) : string
Parameters
- $pageName : string
-
Name of the page
- $pathPrefix : string = 'content'
-
Path where the template should be located
- $context : array<string|int, mixed> = []
-
Optional array of context variables
- $pageDetails : array<string|int, mixed> = []
-
Optional output variable for additional info
- $pattern : string = null
-
Optional file system pattern to search page
Return values
string —Rendered template output