You've already forked symfony-notifications
rename to notifications
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace Bluesquare\NotificationsBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\Extension\Extension;
|
||||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
final class NotificationsExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||
$loader->load('services.yaml');
|
||||
|
||||
$config = $this->processConfiguration(new Configuration(), $configs);
|
||||
// $definition = $container->getDefinition('bluesquare.notifications_bundle.foo');
|
||||
|
||||
return $config;
|
||||
// $this->configurePersistence($loader, $container, $config['provider']);
|
||||
// $this->configureAuthorizationServer($container, $config['authorization_server']);
|
||||
// $this->configureResourceServer($container, $config['resource_server']);
|
||||
// $this->configureScopes($container, $config['scopes']);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getAlias()
|
||||
{
|
||||
return 'bluesquare.notifications_bundle';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
private function configureScopes(ContainerBuilder $container, array $scopes): void
|
||||
{
|
||||
/*$scopeManager = $container
|
||||
->getDefinition(
|
||||
$container->getAlias(ScopeManagerInterface::class)
|
||||
)
|
||||
;
|
||||
|
||||
foreach ($scopes as $scope) {
|
||||
$scopeManager->addMethodCall('save', [
|
||||
new Definition(ScopeModel::class, [$scope]),
|
||||
]);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user