Move custom bundle

This commit is contained in:
Oliver Davies 2017-10-28 12:17:09 +01:00
parent ee40679c95
commit b903baaaf3
8 changed files with 13 additions and 20 deletions

View file

@ -1,15 +1,11 @@
<?php
use App\FormatTalks\FormatTalksBundle;
use App\FormatTalks\SculpinFormatTalksBundle;
use FormatTalksBundle\SculpinFormatTalksBundle;
use Opdavies\Sculpin\Bundle\ContentGeneratorBundle\SculpinContentGeneratorBundle;
use Opdavies\Sculpin\Bundle\GistEmbedBundle\SculpinGistEmbedBundle;
use Opdavies\Sculpin\Bundle\TwigMarkdownBundle\SculpinTwigMarkdownBundle;
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
/**
* Class SculpinKernel
*/
class SculpinKernel extends AbstractKernel
{
/**

View file

@ -22,7 +22,7 @@
},
"autoload": {
"psr-4": {
"App\\FormatTalks\\": "src/format-talks-bundle/src"
"FormatTalksBundle\\": "src/FormatTalksBundle"
}
},
"extra": {

View file

@ -1,6 +1,6 @@
<?php
namespace App\FormatTalks\DependencyInjection;
namespace FormatTalksBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
@ -14,7 +14,7 @@ class SculpinFormatTalksExtension extends Extension
*/
public function load(array $configs, ContainerBuilder $container)
{
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../Resources/config'));
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml');
}
}

View file

@ -0,0 +1,5 @@
services:
twig.format_talks:
class: 'FormatTalksBundle\Twig\FormatTalksExtension'
tags:
- { name: twig.extension }

View file

@ -1,6 +1,6 @@
<?php
namespace App\FormatTalks;
namespace FormatTalksBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;

View file

@ -1,11 +1,8 @@
<?php
namespace App\FormatTalks\Twig;
namespace FormatTalksBundle\Twig;
use Twig_Extension;
use Twig_SimpleFilter;
class FormatTalksExtension extends Twig_Extension
class FormatTalksExtension extends \Twig_Extension
{
/**
* {@inheritdoc}
@ -13,7 +10,7 @@ class FormatTalksExtension extends Twig_Extension
public function getFilters()
{
return [
new Twig_SimpleFilter('format_talks', [$this, 'formatTalks']),
new \Twig_SimpleFilter('format_talks', [$this, 'formatTalks']),
];
}

View file

@ -1,5 +0,0 @@
services:
app.twig.format_talks:
class: 'App\FormatTalks\Twig\FormatTalksExtension'
tags:
- { name: twig.extension }