FluidTYPO3\Fluidpages\Provider\PageProvider::getInheritanceTree PHP Method

getInheritanceTree() protected method

.. -> this record) of record arrays containing raw values.
protected getInheritanceTree ( array $row ) : array
$row array
return array
    protected function getInheritanceTree(array $row)
    {
        $records = $this->loadRecordTreeFromDatabase($row);
        if (0 === count($records)) {
            return $records;
        }
        $template = $records[0][self::FIELD_ACTION_SUB];
        foreach ($records as $index => $record) {
            $hasMainAction = false === empty($record[self::FIELD_ACTION_MAIN]);
            $hasSubAction = false === empty($record[self::FIELD_ACTION_SUB]);
            $shouldUseMainTemplate = $template !== $record[self::FIELD_ACTION_SUB];
            $shouldUseSubTemplate = $template !== $record[self::FIELD_ACTION_MAIN];
            if ($hasMainAction && $shouldUseSubTemplate || $hasSubAction && $shouldUseMainTemplate) {
                return array_slice($records, $index);
            }
        }
        return $records;
    }