@@ -46,7 +46,7 @@ class MyClass
46
46
// Code...
47
47
$this->eventManager->dispatch('my_module_event_before');
48
48
// More code that sets $eventData...
49
- $this->eventManager->dispatch('my_module_event_after',[ 'myEventData'=> $eventData] );
49
+ $this->eventManager->dispatch('my_module_event_after', [ 'myEventData' => $eventData] );
50
50
}
51
51
}
52
52
@@ -78,13 +78,13 @@ class MyObserver implements ObserverInterface
78
78
{
79
79
public function __ construct()
80
80
{
81
- //Observer initialization code...
82
- //You can use dependency injection to get any class this observer may need.
81
+ // Observer initialization code...
82
+ // You can use dependency injection to get any class this observer may need.
83
83
}
84
84
85
85
public function execute(\Magento\Framework\Event\Observer $observer)
86
86
{
87
- //Observer execution code...
87
+ // Observer execution code...
88
88
}
89
89
}
90
90
{% endhighlight %}
@@ -100,14 +100,14 @@ class AnotherObserver implements ObserverInterface
100
100
{
101
101
public function __ construct()
102
102
{
103
- //Observer initialization code...
104
- //You can use dependency injection to get any class this observer may need.
103
+ // Observer initialization code...
104
+ // You can use dependency injection to get any class this observer may need.
105
105
}
106
106
107
107
public function execute(\Magento\Framework\Event\Observer $observer)
108
108
{
109
109
$myEventData = $observer->getData('myEventData');
110
- //Additional observer execution code...
110
+ // Additional observer execution code...
111
111
}
112
112
}
113
113
{% endhighlight %}
0 commit comments