Move custom bundle
This commit is contained in:
parent
ee40679c95
commit
b903baaaf3
8 changed files with 13 additions and 20 deletions
|
@ -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');
|
||||
}
|
||||
}
|
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
|
||||
|
||||
namespace App\FormatTalks;
|
||||
namespace FormatTalksBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
|
@ -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']),
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
services:
|
||||
app.twig.format_talks:
|
||||
class: 'App\FormatTalks\Twig\FormatTalksExtension'
|
||||
tags:
|
||||
- { name: twig.extension }
|
Loading…
Add table
Add a link
Reference in a new issue