FluidTYPO3\Vhs\ViewHelpers\Format\Json\EncodeViewHelper::recursiveDomainObjectToArray PHP Метод

recursiveDomainObjectToArray() защищенный Метод

Convert a single DomainObject instance first to an array, then pass that array through recursive DomainObject detection. This will convert any 1:1, 1:n, n:1 and m:n relations.
protected recursiveDomainObjectToArray ( TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $domainObject, boolean $preventRecursion, mixed $recursionMarker ) : array
$domainObject TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface
$preventRecursion boolean
$recursionMarker mixed
Результат array
    protected function recursiveDomainObjectToArray(DomainObjectInterface $domainObject, $preventRecursion, $recursionMarker)
    {
        $hash = spl_object_hash($domainObject);
        if (true === $preventRecursion && true === in_array($hash, $this->encounteredClasses)) {
            return $recursionMarker;
        }
        $converted = ObjectAccess::getGettableProperties($domainObject);
        array_push($this->encounteredClasses, $hash);
        $converted = $this->recursiveArrayOfDomainObjectsToArray($converted, $preventRecursion, $recursionMarker);
        return $converted;
    }