Skip to content
Permalink
Browse files

reuse existing session object to make sure we have the same config

  • Loading branch information...
flack committed Aug 13, 2019
1 parent 2f61ccf commit 8849eea55c84256c5666836ea6b136b3c9d3ddff
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/midcom/datamanager/datamanager.php
@@ -24,6 +24,7 @@
use midcom\datamanager\extension\type\schemaType;
use midcom\datamanager\extension\type\toolbarType;
use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationExtension;
use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage;
/**
* Experimental datamanager class
@@ -92,12 +93,13 @@ private static function get_factory()
$vb->setTranslator($translator);
$session_storage = new SessionTokenStorage(midcom::get()->session);
$fb->addExtension(new extension())
->addExtension(new CoreExtension())
->addExtension(new HttpFoundationExtension())
->addExtension(new CsrfExtension(new CsrfTokenManager, $translator));
$fb->addExtension(new ValidatorExtension($vb->getValidator()));
->addExtension(new CsrfExtension(new CsrfTokenManager(null, $session_storage), $translator))
->addExtension(new ValidatorExtension($vb->getValidator()));
self::$factory = $fb->getFormFactory();
}

0 comments on commit 8849eea

Please sign in to comment.
You can’t perform that action at this time.