Skip to content

Commit

Permalink
Update Extension.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter authored Dec 10, 2019
1 parent e1123b3 commit 96e5c77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ public function getRoutes(): array
public function initialize($cli = false): void
{
$this->addWidget(new ReferenceWidget());

$this->addTwigExtension(new Twig());

$this->addTwigNamespace('reference-extension');

$this->registerListener('kernel.response', [new EventListener(), 'handleEvent']);
$this->addListener('kernel.response', [new EventListener(), 'handleEvent']);
}

/**
* Ran automatically, if the current request is from the command line (CLI).
* You can use this method to set up things in you extension.
* You can use this method to set up things in your extension.
*
* Note: This runs on every request. Make sure what happens here is quick
* and efficient.
Expand Down

0 comments on commit 96e5c77

Please sign in to comment.