File tree 2 files changed +3
-6
lines changed
components/event_dispatcher 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ access the event arguments::
76
76
);
77
77
$dispatcher->dispatch('foo', $event);
78
78
79
- var_dump($event['counter']);
80
-
81
79
class FooListener
82
80
{
83
81
public function handler(GenericEvent $event)
@@ -97,8 +95,6 @@ Filtering data::
97
95
$event = new GenericEvent($subject, array('data' => 'Foo'));
98
96
$dispatcher->dispatch('foo', $event);
99
97
100
- var_dump($event['data']);
101
-
102
98
class FooListener
103
99
{
104
100
public function filter(GenericEvent $event)
Original file line number Diff line number Diff line change @@ -143,15 +143,16 @@ interface and have an event method for each event it subscribes to::
143
143
use Doctrine\Common\EventSubscriber;
144
144
// for Doctrine < 2.4: use Doctrine\ORM\Event\LifecycleEventArgs;
145
145
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
146
+ use Doctrine\ORM\Events;
146
147
use AppBundle\Entity\Product;
147
148
148
149
class SearchIndexerSubscriber implements EventSubscriber
149
150
{
150
151
public function getSubscribedEvents()
151
152
{
152
153
return array(
153
- ' postPersist' ,
154
- ' postUpdate' ,
154
+ Events:: postPersist,
155
+ Events:: postUpdate,
155
156
);
156
157
}
157
158
You can’t perform that action at this time.
0 commit comments