Set extension configuration key for rewriter.

@param ContainerBuilder $container
@param string           $rewriterServiceId
@param string           $extensionConfigKey
178343
private function setExtensionConfigurationKeyForRewriter(
        ContainerBuilder $container,
        $rewriterServiceId,
        $extensionConfigKey
    ) {
        $rewriterDefinition = $container->getDefinition($rewriterServiceId);

        $methodCalls = $rewriterDefinition->getMethodCalls();

        $methodCalls[] = ['setExtensionConfigurationKey', [$extensionConfigKey]];

        $rewriterDefinition->setMethodCalls($methodCalls);
    }
672277
void writeExtensionByte(int extensionType, int value) throws IOException {
        output.write(FIX_EXT_1);
        output.write(extensionType);
        output.write(value);
    }
220826
public void setExtendedKeyUsage(java.util.Collection<String> extendedKeyUsage) {
        if (extendedKeyUsage == null) {
            this.extendedKeyUsage = null;
            return;
        }

        this.extendedKeyUsage = new java.util.ArrayList<String>(extendedKeyUsage);
    }
162558
public function load(ContainerBuilder $container, array $config)
    {
        $container->setParameter('cjm.local_webserver.configuration.host', $config['host']);
        $container->setParameter('cjm.local_webserver.configuration.port', $config['port']);
        $container->setParameter('cjm.local_webserver.configuration.docroot', $config['docroot']);
        $container->setParameter('cjm.local_webserver.configuration.suites', $config['suites']);
        $container->setParameter('cjm.local_webserver.configuration.router', $config['router']);

        $this->loadEventSubscribers($container);
        $this->loadWebserverController($container);
        $this->loadWebserverConfiguration($container, $config);
    }
144864
protected function configureTwigBundle(ContainerBuilder $container, array $config)
    {
        if ($container->hasExtension('twig')) {
            $resources = array('LifoTypeaheadBundle:Form:typeahead.html.twig');
            if (Kernel::VERSION_ID >= '20600') {
                $container->prependExtensionConfig('twig', array('form_themes' => $resources));
            } else {
                $container->prependExtensionConfig('twig', array('form' => array('resources' => $resources)));
            }
        }
    }
1119063
@Override
    public String build(final RegisteredService service, final String extension) {
        return StringUtils.remove(service.getName(), ' ') + '-' + service.getId() + '.' + extension;
    }
616423
public function saveExtension(
        $uuid,
        $data,
        $extensionName,
        $webspaceKey,
        $locale,
        $userId
    ) {
        $document = $this->loadDocument(
            $uuid,
            $locale,
            [
                'exclude_ghost' => true,
            ]
        );

        if (null === $document) {
            throw new TranslatedNodeNotFoundException($uuid, $locale);
        }

        if (!$document instanceof ExtensionBehavior) {
            throw new \RuntimeException(
                sprintf(
                    'Document of class "%s" must implement the ExtensionableBehavior if it is to be extended',
                    get_class($document)
                )
            );
        }

        // save data of extensions
        $extension = $this->extensionManager->getExtension($document->getStructureType(), $extensionName);
        $node = $this->inspector->getNode($document);

        $extension->save($node, $data, $webspaceKey, $locale);
        $extensionData = $extension->load($node, $webspaceKey, $locale);

        $document->setExtension($extension->getName(), $extensionData);

        $this->documentManager->flush();

        $structure = $this->documentToStructure($document);

        $event = new ContentNodeEvent($node, $structure);
        $this->eventDispatcher->dispatch(ContentEvents::NODE_POST_SAVE, $event);

        return $structure;
    }
308537
public function extendConfig( $container, $key, $default ) {
		$config = isset( $container[ WPEMERGE_CONFIG_KEY ] ) ? $container[ WPEMERGE_CONFIG_KEY ] : [];
		$config = Arr::get( $config, $key, $default );

		if ( $config !== $default && is_array( $config ) && is_array( $default ) ) {
			$config = array_replace_recursive( $default, $config );
		}

		$container[ WPEMERGE_CONFIG_KEY ] = array_merge(
			$container[ WPEMERGE_CONFIG_KEY ],
			[ $key => $config ]
		);
	}
1255999
public function prepend(ContainerBuilder $container)
    {
        // get all bundles
        $bundles = $container->getParameter('kernel.bundles');
        // determine if StofDoctrineExtensionsBundle is registered
        if (isset($bundles['StofDoctrineExtensionsBundle'])) {
            foreach ($container->getExtensions() as $name => $extension) {
                switch ($name) {
                    case 'stof_doctrine_extensions':
                        $configs = $container->getExtensionConfig('stof_doctrine_extensions');
                        if (isset($configs[0])) {
                            if (isset($configs[0]['orm'])) {
                                if ($configs[0]['orm']['default']) {
                                    $configs[0]['orm']['default']['timestampable'] = true;
                                } else {
                                    $configs[0]['orm']['default'] = ['timestampable' => true];
                                }
                            } else {
                                $configs[0]['orm'] = ['default' => ['timestampable' => true]];
                            }
                        } else {
                            $configs = ['orm' => ['default' => ['timestampable' => true]]];
                        }
                        if (isset($configs[0]['orm'])) {
                            $container->prependExtensionConfig($name, $configs[0]);
                        }
                        break;
                }
            }
        }
    }
582780
private function registerRichTextConfiguration(array $config, ContainerBuilder $container)
    {
        $customTagsConfig = $config['custom_tags'] ?? [];
        $customStylesConfig = $config['custom_styles'] ?? [];
        $alloyEditorConfig = $config['alloy_editor'] ?? [];

        $availableSiteAccesses = $container->hasParameter('ezpublish.siteaccess.list')
            ? $container->getParameter('ezpublish.siteaccess.list')
            : [];

        $this->validateCustomTemplatesConfig(
            $availableSiteAccesses,
            $customTagsConfig,
            'custom_tags',
            'Tag',
            $container
        );
        $this->validateCustomTemplatesConfig(
            $availableSiteAccesses,
            $customStylesConfig,
            'custom_styles',
            'Style',
            $container
        );

        $container->setParameter(static::RICHTEXT_CUSTOM_TAGS_PARAMETER, $customTagsConfig);
        $container->setParameter(static::RICHTEXT_CUSTOM_STYLES_PARAMETER, $customStylesConfig);
        $container->setParameter(static::RICHTEXT_ALLOY_EDITOR_PARAMETER, $alloyEditorConfig);
    }
457313
protected static function enrichForDecryptionProvider(
        Configuration $configuration,
        array &$baseConfiguration
    ) : void {
        if ($configuration->hasValue('sharedKey')) {
            $baseConfiguration['sharedKey'] = $configuration->getString('sharedKey', null);
        }

        if ($configuration->hasValue('new_privatekey')) {
            $baseConfiguration['privateKeys'][] = new PrivateKey(
                $configuration->getString('new_privatekey'),
                PrivateKey::NAME_NEW,
                $configuration->getString('new_privatekey_pass', null)
            );
        }

        if ($configuration->getBoolean('assertion.encryption', false)) {
            $baseConfiguration['privateKeys'][] = new PrivateKey(
                $configuration->getString('privatekey'),
                PrivateKey::NAME_DEFAULT,
                $configuration->getString('privatekey_pass', null)
            );

            if ($configuration->hasValue('encryption.blacklisted-algorithms')) {
                $baseConfiguration['blacklistedEncryptionAlgorithms'] = $configuration
                    ->getValue('encryption.blacklisted-algorithms');
            }
        }
    }
725203
protected function updateAdditionalConfiguration($extensionKey)
	{
        /**
         * Add Flashmessage that the configuration has to be checked
         */
        $flashMessage = GeneralUtility::makeInstance(
            'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
            'To enable the features you have to edit the extensions configuration in the Extension Manager. After the new configuration is saved please relogin to the backend to ensure the changes!',
            'Check your configuration',
            FlashMessage::NOTICE,
            true
        );
        $this->addFlashMessage($flashMessage);

        /**
         * Update configuration
         */
		$newLines = $this->getCleanAdditionalConfiguration($extensionKey);

		if (!empty(end($newLines))) {
			$newLines[] = '';
		}

		$newLines[] = '// Run configuration modifier for extension ' . $extensionKey . ' - added on ' . date(DATE_ATOM) . ' by ' . __CLASS__;
		$newLines[] = 'if (class_exists(\'Gilbertsoft\ProtectedConfig\Configuration\Modifier\')) {';
		$newLines[] = '	\Gilbertsoft\ProtectedConfig\Configuration\Modifier::processLocalConfiguration(\'' . $extensionKey . '\');';
		$newLines[] = '}';

		$this->getConfigurationManager()->writeAdditionalConfiguration($newLines);

        /**
         * Add Flashmessage that the configuration has written
         */
        $flashMessage = GeneralUtility::makeInstance(
            'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
            'Configuration successfully added to ' .
            $this->getConfigurationManager()->getAdditionalConfigurationFileLocation() .
            '.',
            'Configuration added',
            FlashMessage::OK,
            true
        );
        $this->addFlashMessage($flashMessage);
	}
746364
public function buildTypoScriptRenderingConfiguration($extensionName, $pluginName, $contextRecord)
    {
        $configurationBuilder = new RecordRenderingConfigurationBuilder(new RenderingContext($GLOBALS['TSFE']));
        return $configurationBuilder->configurationFor($extensionName, $pluginName, $contextRecord);
    }
335251
private function remapParameters(ContainerBuilder $container, $prefix, array $config)
    {
        foreach ($config as $key => $value) {
            $container->setParameter(sprintf('%s.%s', $prefix, $key), $value);
        }
    }
1011668
private void extendConfig(Configuration config, MavenShellCallback callback) {
    List<Context> contexts = config.getContexts();
    if (contexts == null) return;

    // fix java file encoding
    for (Context context : contexts) {
      context.addProperty(PropertyRegistry.CONTEXT_JAVA_FILE_ENCODING, "UTF-8");
    }

    if (!disableNameConversion) {
      PluginConfiguration pluginConfiguration = new PluginConfiguration();
      pluginConfiguration.setConfigurationType(ColumnNameConversionPlugin.class.getTypeName());
      pluginConfiguration.addProperty(ColumnNameConversionPlugin.COLUMN_PATTERN_NAME, columnPattern);
      addToContext(contexts, pluginConfiguration);
      if (verbose) getLog().info("enable name conversion service");
    }

    if (!disableExtendMethods) {
      PluginConfiguration pluginConfiguration = new PluginConfiguration();
      pluginConfiguration.setConfigurationType(BatchInsertPlugin.class.getTypeName());
      addToContext(contexts, pluginConfiguration);
      if (verbose) getLog().info("enable batch insert service");

      pluginConfiguration = new PluginConfiguration();
      pluginConfiguration.setConfigurationType(BatchUpdatePlugin.class.getTypeName());
      addToContext(contexts, pluginConfiguration);
      if (verbose) getLog().info("enable batch update service");

      for(Context context : contexts){
        chooseUpsertPlugin(context);
      }
    }

    if (!disableGeom) {
      for (Context context : contexts) {
        chooseGeomPlugin(context);
      }
    }

    if (!disablePagination) {
      for (Context context : contexts) {
        choosePaginationPlugin(context);
      }
    }

    if (overwrite) {
      PluginConfiguration pluginConfiguration = new PluginConfiguration();
      pluginConfiguration.setConfigurationType(MapperOverwriteEnablePlugin.class.getTypeName());
      addToContext(contexts, pluginConfiguration);
      if (verbose) getLog().info("enable mapper overwrite service");
    }

    if (enableQueryDslSupport) {
      PluginConfiguration pluginConfiguration = new PluginConfiguration();
      pluginConfiguration.setConfigurationType(QueryDslPlugin.class.getTypeName());
      addToContext(contexts, pluginConfiguration);
      if (verbose) getLog().info("enable querydsl support service");
    }

    if (!disableMergeSupport) {
      callback.setMergeSupported(true);
      PluginConfiguration pluginConfiguration = new PluginConfiguration();
      pluginConfiguration.setConfigurationType(XMLMergePlugin.class.getTypeName());
      pluginConfiguration.addProperty(XMLMergePlugin.ROOTDIR_NAME, outputDirectory.getAbsolutePath());
      addToContext(contexts, pluginConfiguration);
      if (verbose) getLog().info("enable content merge service");
    }

    // leave the cg for the last
    extendCG(config, contexts);

  }
197887
public static function getDefinitionFormContainer(CompilerExtension $compilerExtension, $indexConfig = 'formContainer', $prefixName = 'formContainer'): ServiceDefinition
    {
        $builder = $compilerExtension->getContainerBuilder();
        $config = $compilerExtension->getConfig();

        return $builder->addDefinition($compilerExtension->prefix($prefixName))
            ->setFactory($config[$indexConfig])
            ->setAutowired($config['autowired']);
    }
357452
function rewrite_extension(source, ext) {
  var source_ext = path.extname(source);
  return (source_ext === ext) ? source : (source + ext);
}