/** * @param tubepress_api_ioc_ContainerBuilderInterface $containerBuilder The primary service container builder. * * @api * * @since 4.0.0 */ public function process(tubepress_api_ioc_ContainerBuilderInterface $containerBuilder) { if (!$containerBuilder->hasParameter(tubepress_internal_boot_PrimaryBootstrapper::CONTAINER_PARAM_BOOT_ARTIFACTS)) { return; } $bootArtifacts = $containerBuilder->getParameter(tubepress_internal_boot_PrimaryBootstrapper::CONTAINER_PARAM_BOOT_ARTIFACTS); if (!is_array($bootArtifacts) || !isset($bootArtifacts['themes'])) { return; } $serializedThemes = $bootArtifacts['themes']; $bootSettings = $containerBuilder->get(tubepress_api_boot_BootSettingsInterface::_); $serializer = new tubepress_internal_boot_helper_uncached_Serializer($bootSettings); $unserializedThemes = $serializer->unserialize($serializedThemes); $adjustedSystemThemes = $this->_adjustLegacySystemThemes($containerBuilder, $unserializedThemes); $userLegacyThemes = $this->_findUserLegacyThemes($bootSettings, $containerBuilder); $allLegacyThemes = array_merge($adjustedSystemThemes, $userLegacyThemes); $allThemes = array_merge($unserializedThemes, $allLegacyThemes); $serializedThemes = $serializer->serialize($allThemes); $bootArtifacts['themes'] = $serializedThemes; $containerBuilder->setParameter(tubepress_internal_boot_PrimaryBootstrapper::CONTAINER_PARAM_BOOT_ARTIFACTS, $bootArtifacts); }