/**
* Post process configuration to add io_root_dir and io_prefix.
*/
public function postMap(array $config, ContextualizerInterface $contextualizer)
{
$container = $contextualizer->getContainer();
// complex parameters dependencies
foreach (array_merge($config['siteaccess']['list'], array_keys($config['siteaccess']['groups'])) as $scope) {
$this->addComplexParametersDependencies('io.url_prefix', $scope, $container);
$this->addComplexParametersDependencies('io.legacy_url_prefix', $scope, $container);
$this->addComplexParametersDependencies('io.root_dir', $scope, $container);
}
// we should only write for default, and for sa/sa groups/global IF they have a declared value
$scopes = array_merge(array('default'), $config['siteaccess']['list'], array_keys($config['siteaccess']['groups']));
foreach ($scopes as $scope) {
// post process io.url_prefix for complex settings
$postProcessedValue = $this->postProcessComplexSetting('io.url_prefix', $scope, $container);
if (is_string($postProcessedValue)) {
$contextualizer->setContextualParameter('io.url_prefix', $scope, $postProcessedValue);
}
// post process io.legacy_url_prefix for complex settings
$postProcessedValue = $this->postProcessComplexSetting('io.legacy_url_prefix', $scope, $container);
if (is_string($postProcessedValue)) {
$contextualizer->setContextualParameter('io.legacy_url_prefix', $scope, $postProcessedValue);
}
// post process io.root_dir for complex settings
$postProcessedValue = $this->postProcessComplexSetting('io.root_dir', $scope, $container);
if (is_string($postProcessedValue)) {
$contextualizer->setContextualParameter('io.root_dir', $scope, $postProcessedValue);
}
}
}