-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IBX-88: Restored BC layer for ezplatform Semantic config
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/bundle/DependencyInjection/Extension/PlatformExtension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Ibexa\Bundle\CompatibilityLayer\DependencyInjection\Extension; | ||
|
||
use Ibexa\Bundle\CompatibilityLayer\DependencyInjection\ContainerBuilder as IbexaContainerBuilder; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\Extension; | ||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; | ||
|
||
final class PlatformExtension extends Extension implements PrependExtensionInterface | ||
{ | ||
public const EXTENSION_ALIAS = 'ezplatform'; | ||
|
||
public function load(array $configs, ContainerBuilder $container): void | ||
{ | ||
} | ||
|
||
public function getAlias(): string | ||
{ | ||
return self::EXTENSION_ALIAS; | ||
} | ||
|
||
public function prepend(ContainerBuilder $container): void | ||
{ | ||
if ($container instanceof IbexaContainerBuilder) { | ||
// Nothing to do, BC is handled by Ibexa ContainerBuilder | ||
return; | ||
} | ||
|
||
$currentExtensionName = $container->hasExtension('ibexa') ? 'ibexa' : 'ezpublish'; | ||
foreach ($container->getExtensionConfig('ezplatform') as $legacyExtensionConfig) { | ||
$container->prependExtensionConfig($currentExtensionName, $legacyExtensionConfig); | ||
} | ||
} | ||
} | ||
|
||
class_alias(PlatformExtension::class, 'EzSystems\EzPlatformCoreBundle\DependencyInjection\EzPlatformCoreExtension'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters