This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Symfony \Cmf \Bundle \RoutingAutoBundle \EventListener ;
4
4
5
- use Doctrine \ODM \PHPCR \Event \OnFlushEventArgs ;
5
+ use Doctrine \Common \Persistence \Event \ManagerEventArgs ;
6
+ use Doctrine \ODM \PHPCR \DocumentManager ;
6
7
use Symfony \Component \DependencyInjection \ContainerInterface ;
7
8
use Symfony \Cmf \Bundle \RoutingAutoBundle \Document \AutoRoute ;
9
+ use Symfony \Cmf \Bundle \RoutingAutoBundle \AutoRoute \AutoRouteManager ;
8
10
9
11
/**
10
12
* Doctrine PHPCR ODM listener for maintaining automatic routes.
@@ -18,16 +20,20 @@ public function __construct(ContainerInterface $container)
18
20
$ this ->container = $ container ;
19
21
}
20
22
23
+ /**
24
+ * @return AutoRouteManager
25
+ */
21
26
protected function getArm ()
22
27
{
23
28
// lazy load the auto_route_manager service to prevent a cirular-reference
24
29
// to the document manager.
25
30
return $ this ->container ->get ('cmf_routing_auto.auto_route_manager ' );
26
31
}
27
32
28
- public function onFlush (OnFlushEventArgs $ args )
33
+ public function onFlush (ManagerEventArgs $ args )
29
34
{
30
- $ dm = $ args ->getDocumentManager ();
35
+ /** @var $dm DocumentManager */
36
+ $ dm = $ args ->getObjectManager ();
31
37
$ uow = $ dm ->getUnitOfWork ();
32
38
33
39
$ scheduledInserts = $ uow ->getScheduledInserts ();
You can’t perform that action at this time.
0 commit comments