File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/com/magento/idea/magento2plugin Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,10 @@ private boolean checkIsEventDispatchMethod(final MethodReference element) {
136
136
return false ;
137
137
}
138
138
final String fqn = ((PhpClass ) phpClass ).getPresentableFQN ();
139
- return Observer .INTERFACE .equals (fqn );
139
+
140
+ return Observer .INTERFACE .equals (fqn )
141
+ || Observer .IMPLEMENTATION .equals (fqn )
142
+ || Observer .ENTITY_IMPL .equals (fqn );
140
143
}
141
144
142
145
private boolean checkIsElementStringLiteral (final @ NotNull PsiElement element ) {
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ public class Observer implements ModuleFileInterface {
12
12
13
13
private final String fileName ;
14
14
public static final String INTERFACE = "Magento\\ Framework\\ Event\\ ManagerInterface" ;
15
+ public static final String IMPLEMENTATION = "Magento\\ Framework\\ Event\\ Manager" ;
16
+ public static final String ENTITY_IMPL = "Magento\\ Framework\\ EntityManager\\ EventManager" ;
15
17
public static final String DISPATCH_METHOD = "dispatch" ;
16
18
public static final String NAME_ATTRIBUTE = "name" ;
17
19
public static final String OBSERVER_EXECUTE_TEMPLATE_NAME = "Magento Observer Execute Method" ;
You can’t perform that action at this time.
0 commit comments