Example #1
0
 /**
  * Add custom twig extension.
  *
  * @param \ContaoTwigInitializeEvent $event The event.
  *
  * @return void
  */
 public function initTwig(\ContaoTwigInitializeEvent $event)
 {
     $contaoTwig = $event->getContaoTwig();
     $environment = $contaoTwig->getEnvironment();
     $environment->addExtension(new DcGeneralExtension());
 }
 public function initTwig(\ContaoTwigInitializeEvent $event)
 {
     $event->getContaoTwig()->getEnvironment()->addExtension(new TwigExtension());
 }