protected static function buildConfigurationArray($pageId, $path, $initializeTsfe, $language)
    {
        if ($initializeTsfe) {
            self::initializeTsfe($pageId, $language);
            $configurationToUse = self::getConfigurationFromInitializedTSFE($path);
        } else {
            $configurationToUse = self::getConfigurationFromExistingTSFE($pageId, $path, $language);
        }

        return is_array($configurationToUse) ? $configurationToUse : [];
    }