Skip to content

Commit

Permalink
Update Twig configuration:
Browse files Browse the repository at this point in the history
- add Quote Twig extension
  • Loading branch information
webeweb committed May 7, 2024
1 parent 5bb0853 commit 676bb4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/common/Resources/config/twig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ services:
tags:
- { name: "twig.extension" }

wbw.common.twig.extension.quote:
class: WBW\Bundle\CommonBundle\Twig\Extension\QuoteTwigExtension
public: false
arguments: [ "@twig", "@wbw.common.manager.quote" ]
tags:
- { name: "twig.extension" }

wbw.common.twig.extension.string:
class: WBW\Bundle\CommonBundle\Twig\Extension\StringTwigExtension
public: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
use WBW\Bundle\CommonBundle\Tests\AbstractTestCase;
use WBW\Bundle\CommonBundle\Twig\Extension\AssetsTwigExtension;
use WBW\Bundle\CommonBundle\Twig\Extension\ContainerTwigExtension;
use WBW\Bundle\CommonBundle\Twig\Extension\QuoteTwigExtension;
use WBW\Bundle\CommonBundle\Twig\Extension\StringTwigExtension;

/**
Expand Down Expand Up @@ -150,6 +151,7 @@ public function testLoad(): void {
// Twig extensions
$this->assertInstanceOf(AssetsTwigExtension::class, $this->containerBuilder->get(AssetsTwigExtension::SERVICE_NAME));
$this->assertInstanceOf(ContainerTwigExtension::class, $this->containerBuilder->get(ContainerTwigExtension::SERVICE_NAME));
$this->assertInstanceOf(QuoteTwigExtension::class, $this->containerBuilder->get(QuoteTwigExtension::SERVICE_NAME));
$this->assertInstanceOf(StringTwigExtension::class, $this->containerBuilder->get(StringTwigExtension::SERVICE_NAME));
}

Expand Down

0 comments on commit 676bb4d

Please sign in to comment.