rename to notifications

This commit is contained in:
PaulCombal 2019-03-01 12:49:26 +01:00
parent 480947afaf
commit d8e915d759
13 changed files with 59 additions and 59 deletions

View File

@ -1,8 +1,8 @@
<?php
namespace Bluesquare\TestBundle\Controller;
namespace Bluesquare\NotificationsBundle\Controller;
use Bluesquare\TestBundle\Service\FooService;
use Bluesquare\NotificationsBundle\Service\FooService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
@ -12,7 +12,7 @@ class MainController extends AbstractController
{
die($request->getMethod());
// ON PEUT PAS INJECTER UN SERVICE DU BUNDLE EN QUESTION DANS LES ARGS DONC ON LE récupère ainsi :
$this->get('bluesquare.test_bundle.foo')->foo();
$this->get('bluesquare.notifications_bundle.foo')->foo();
die('hello');
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace Bluesquare\TestBundle\DependencyInjection;
namespace Bluesquare\NotificationsBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Bluesquare\TestBundle\DependencyInjection;
namespace Bluesquare\NotificationsBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\LoaderInterface;
@ -11,7 +11,7 @@ use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
final class TestExtension extends Extension implements PrependExtensionInterface
final class NotificationsExtension extends Extension implements PrependExtensionInterface
{
/**
* {@inheritdoc}
@ -22,7 +22,7 @@ final class TestExtension extends Extension implements PrependExtensionInterface
$loader->load('services.yaml');
$config = $this->processConfiguration(new Configuration(), $configs);
// $definition = $container->getDefinition('bluesquare.test_bundle.foo');
// $definition = $container->getDefinition('bluesquare.notifications_bundle.foo');
return $config;
// $this->configurePersistence($loader, $container, $config['provider']);
@ -36,7 +36,7 @@ final class TestExtension extends Extension implements PrependExtensionInterface
*/
public function getAlias()
{
return 'bluesquare.test_bundle';
return 'bluesquare.notifications_bundle';
}
/**

View File

@ -1,11 +1,11 @@
<?php
namespace Bluesquare\TestBundle\Entity;
namespace Bluesquare\NotificationsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="Bluesquare\TestBundle\Repository\BillingInvoiceRepository")
* @ORM\Entity(repositoryClass="Bluesquare\NotificationsBundle\Repository\BillingInvoiceRepository")
*/
class BillingInvoice
{

View File

@ -0,0 +1,25 @@
<?php
namespace Bluesquare\NotificationsBundle;
use Bluesquare\NotificationsBundle\Entity\BillingInvoice;
use Bluesquare\NotificationsBundle\Repository\BillingInvoiceRepository;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Bluesquare\NotificationsBundle\DependencyInjection\NotificationsExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class NotificationsBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
}
public function getContainerExtension()
{
if (null === $this->extension)
$this->extension = new NotificationsExtension();
return $this->extension;
}
}

View File

@ -1,8 +1,8 @@
<?php
namespace Bluesquare\TestBundle\Repository;
namespace Bluesquare\NotificationsBundle\Repository;
use Bluesquare\TestBundle\Entity\BillingInvoice;
use Bluesquare\NotificationsBundle\Entity\BillingInvoice;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;

View File

@ -0,0 +1,3 @@
bluesquare_notifications_bundle_notifications:
path: /test-notifs
controller: Bluesquare\NotificationsBundle\Controller\MainController::index

View File

@ -0,0 +1,16 @@
services:
# Si on a des repositories...
Bluesquare\NotificationsBundle\Repository\:
resource: '../../Repository'
autowire: true
tags: ['doctrine.repository_service']
# Services : alias
Bluesquare\NotificationsBundle\Service\FooService: '@bluesquare.notifications_bundle.foo'
# Services : params
bluesquare.notifications_bundle.foo:
class: Bluesquare\NotificationsBundle\Service\FooService
autowire: true
public: true
arguments: ['@request_stack']

View File

@ -1,6 +1,6 @@
<?php
namespace Bluesquare\TestBundle\Service;
namespace Bluesquare\NotificationsBundle\Service;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;

View File

@ -1,3 +0,0 @@
bluesquare_test_bundle_test:
path: /test
controller: Bluesquare\TestBundle\Controller\MainController::index

View File

@ -1,16 +0,0 @@
services:
# Si on a des repositories...
Bluesquare\TestBundle\Repository\:
resource: '../../Repository'
autowire: true
tags: ['doctrine.repository_service']
# Services : alias
Bluesquare\TestBundle\Service\FooService: '@bluesquare.test_bundle.foo'
# Services : params
bluesquare.test_bundle.foo:
class: Bluesquare\TestBundle\Service\FooService
autowire: true
public: true
arguments: ['@request_stack']

View File

@ -1,25 +0,0 @@
<?php
namespace Bluesquare\TestBundle;
use Bluesquare\TestBundle\Entity\BillingInvoice;
use Bluesquare\TestBundle\Repository\BillingInvoiceRepository;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Bluesquare\TestBundle\DependencyInjection\TestExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class TestBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
}
public function getContainerExtension()
{
if (null === $this->extension)
$this->extension = new TestExtension();
return $this->extension;
}
}

View File

@ -1,6 +1,6 @@
{
"name": "bluesquare-packages/symfony-notifications",
"description": "Test package created by Bluesquare Computing",
"description": "Notifications package created by Bluesquare Computing",
"keywords": ["template", "composer", "package"],
"license": "proprietary",
"authors": [
@ -15,7 +15,7 @@
},
"autoload": {
"psr-4": {
"Bluesquare\\TestBundle\\": "TestBundle/"
"Bluesquare\\NotificationsBundle\\": "NotificationsBundle/"
}
}
}