Cms\Traits\ParsableController
Overview
ParsableController adds property and attribute parsing logic to the CMS controller
Protected Methods
protected makeDynamicAttributeReplacement()
protected makeDynamicAttributeReplacement(
$attrValue,
$parameters = []
): array|null
makeDynamicAttributeReplacement will look inside attribute values to replace any Twig-like variables with the values inside the parameters.
{{ post.title }}
protected makeRouterPropertyReplacement()
protected makeRouterPropertyReplacement(
$propertyValue,
$routerParameters = []
): array|null
makeRouterPropertyReplacement will look inside property values to replace any Twig-like variables with values from the route parameters.
{{ :post }}
protected parseAllEnvironmentVars()
protected parseAllEnvironmentVars(): void
parseAllEnvironmentVars parses vars for all relevant objects.
protected parseEnvironmentVarsOnComponent()
protected parseEnvironmentVarsOnComponent(
$component,
$vars = [],
$properties = null,
$propPrefix = ''
): void
parseEnvironmentVarsOnComponent where property values should be defined as {{ param }}.
protected parseEnvironmentVarsOnTemplate()
protected parseEnvironmentVarsOnTemplate(
$template,
$vars = [],
$attributes = null,
$attrPrefix = ''
): void
parseEnvironmentVarsOnTemplate where property values should be defined as {{ param }}.
protected parseRouteParamsOnComponent()
protected parseRouteParamsOnComponent(
$component,
$params = [],
$properties = null,
$propPrefix = ''
): void
parseRouteParamsOnComponent where property values should be defined as {{ :param }}.