Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6481153

Browse files
authored
Merge pull request magento#3073 from rickkuilman/patch-2
Added consistency to dev docs
2 parents 497d62f + 2716dd3 commit 6481153

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

guides/v2.1/extension-dev-guide/events-and-observers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class MyClass
4646
// Code...
4747
$this->eventManager->dispatch('my_module_event_before');
4848
// 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]);
5050
}
5151
}
5252

@@ -78,13 +78,13 @@ class MyObserver implements ObserverInterface
7878
{
7979
public function __construct()
8080
{
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.
8383
}
8484

8585
public function execute(\Magento\Framework\Event\Observer $observer)
8686
{
87-
//Observer execution code...
87+
// Observer execution code...
8888
}
8989
}
9090
{% endhighlight %}
@@ -100,14 +100,14 @@ class AnotherObserver implements ObserverInterface
100100
{
101101
public function __construct()
102102
{
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.
105105
}
106106

107107
public function execute(\Magento\Framework\Event\Observer $observer)
108108
{
109109
$myEventData = $observer->getData('myEventData');
110-
//Additional observer execution code...
110+
// Additional observer execution code...
111111
}
112112
}
113113
{% endhighlight %}

0 commit comments

Comments
 (0)