Commit c6f03783 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Corrections pour ZF3.

parent 9a8d8356
......@@ -2,6 +2,7 @@
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
use UnicaenAuth\Guard\PrivilegeController;
use UnicaenFaq\Controller\Factory\FaqControllerFactory;
use UnicaenFaq\Form\Factory\FaqFormFactory;
use UnicaenFaq\Provider\Privilege\FaqPrivileges;
......@@ -38,7 +39,7 @@ return array(
],
],
'guards' => [
'BjyAuthorize\Guard\Controller' => [
PrivilegeController::class => [
[
'controller' => 'UnicaenFaq\Controller\Index',
'action' => [
......
......@@ -5,13 +5,14 @@ namespace UnicaenFaq\Form\Factory;
use DoctrineModule\Stdlib\Hydrator\DoctrineObject;
use Interop\Container\ContainerInterface;
use UnicaenFaq\Form\FaqForm;
use Zend\Hydrator\HydratorPluginManager;
class FaqFormFactory
{
public function __invoke(ContainerInterface $container)
{
/** @var DoctrineObject $hydrator */
$hydrator = $container->get('HydratorManager')->get('DoctrineModule\Stdlib\Hydrator\DoctrineObject');
$hydrator = $container->get(HydratorPluginManager::class)->get(DoctrineObject::class);
$form = new FaqForm();
$form->setHydrator($hydrator);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment