Move custom bundle
This commit is contained in:
parent
ee40679c95
commit
b903baaaf3
|
@ -1,15 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\FormatTalks\FormatTalksBundle;
|
use FormatTalksBundle\SculpinFormatTalksBundle;
|
||||||
use App\FormatTalks\SculpinFormatTalksBundle;
|
|
||||||
use Opdavies\Sculpin\Bundle\ContentGeneratorBundle\SculpinContentGeneratorBundle;
|
use Opdavies\Sculpin\Bundle\ContentGeneratorBundle\SculpinContentGeneratorBundle;
|
||||||
use Opdavies\Sculpin\Bundle\GistEmbedBundle\SculpinGistEmbedBundle;
|
use Opdavies\Sculpin\Bundle\GistEmbedBundle\SculpinGistEmbedBundle;
|
||||||
use Opdavies\Sculpin\Bundle\TwigMarkdownBundle\SculpinTwigMarkdownBundle;
|
use Opdavies\Sculpin\Bundle\TwigMarkdownBundle\SculpinTwigMarkdownBundle;
|
||||||
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
|
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
|
||||||
|
|
||||||
/**
|
|
||||||
* Class SculpinKernel
|
|
||||||
*/
|
|
||||||
class SculpinKernel extends AbstractKernel
|
class SculpinKernel extends AbstractKernel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\FormatTalks\\": "src/format-talks-bundle/src"
|
"FormatTalksBundle\\": "src/FormatTalksBundle"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\FormatTalks\DependencyInjection;
|
namespace FormatTalksBundle\DependencyInjection;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
|
@ -14,7 +14,7 @@ class SculpinFormatTalksExtension extends Extension
|
||||||
*/
|
*/
|
||||||
public function load(array $configs, ContainerBuilder $container)
|
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');
|
$loader->load('services.yml');
|
||||||
}
|
}
|
||||||
}
|
}
|
5
src/FormatTalksBundle/Resources/config/services.yml
Normal file
5
src/FormatTalksBundle/Resources/config/services.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
services:
|
||||||
|
twig.format_talks:
|
||||||
|
class: 'FormatTalksBundle\Twig\FormatTalksExtension'
|
||||||
|
tags:
|
||||||
|
- { name: twig.extension }
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\FormatTalks;
|
namespace FormatTalksBundle;
|
||||||
|
|
||||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\FormatTalks\Twig;
|
namespace FormatTalksBundle\Twig;
|
||||||
|
|
||||||
use Twig_Extension;
|
class FormatTalksExtension extends \Twig_Extension
|
||||||
use Twig_SimpleFilter;
|
|
||||||
|
|
||||||
class FormatTalksExtension extends Twig_Extension
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
@ -13,7 +10,7 @@ class FormatTalksExtension extends Twig_Extension
|
||||||
public function getFilters()
|
public function getFilters()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new Twig_SimpleFilter('format_talks', [$this, 'formatTalks']),
|
new \Twig_SimpleFilter('format_talks', [$this, 'formatTalks']),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
services:
|
|
||||||
app.twig.format_talks:
|
|
||||||
class: 'App\FormatTalks\Twig\FormatTalksExtension'
|
|
||||||
tags:
|
|
||||||
- { name: twig.extension }
|
|
Loading…
Reference in a new issue