2 namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
64 public function evaluate(\TYPO3\CMS\
Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
66 return self::getPropertyPath($renderingContext->getTemplateVariableContainer(),
$this->objectPath, $renderingContext);
82 public static function getPropertyPath($subject, $propertyPath, \TYPO3\CMS\
Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
84 $propertyPathSegments = explode(
'.', $propertyPath);
85 foreach ($propertyPathSegments as $pathSegment) {
86 if ($subject === null || is_scalar($subject)) {
89 $propertyExists =
false;
90 $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyInternal($subject, $pathSegment,
false, $propertyExists);
91 if ($propertyExists !==
true && (is_array($subject) || $subject instanceof \ArrayAccess) && isset($subject[$pathSegment])) {
92 $subject = $subject[$pathSegment];
94 $subject = $propertyValue;