Skip to content

Commit 9460197

Browse files
853: Extended possible observer references fqns
1 parent 66052dd commit 9460197

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/com/magento/idea/magento2plugin/actions/generation/CreateAnObserverAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ private boolean checkIsEventDispatchMethod(final MethodReference element) {
139139

140140
return Observer.INTERFACE.equals(fqn)
141141
|| Observer.IMPLEMENTATION.equals(fqn)
142-
|| Observer.ENTITY_IMPL.equals(fqn);
142+
|| Observer.ENTITY_IMPL.equals(fqn)
143+
|| Observer.STAGING_IMPL.equals(fqn);
143144
}
144145

145146
private boolean checkIsElementStringLiteral(final @NotNull PsiElement element) {

src/com/magento/idea/magento2plugin/magento/files/Observer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class Observer implements ModuleFileInterface {
1414
public static final String INTERFACE = "Magento\\Framework\\Event\\ManagerInterface";
1515
public static final String IMPLEMENTATION = "Magento\\Framework\\Event\\Manager";
1616
public static final String ENTITY_IMPL = "Magento\\Framework\\EntityManager\\EventManager";
17+
public static final String STAGING_IMPL = "Magento\\Staging\\Model\\Event\\Manager";
1718
public static final String DISPATCH_METHOD = "dispatch";
1819
public static final String NAME_ATTRIBUTE = "name";
1920
public static final String OBSERVER_EXECUTE_TEMPLATE_NAME = "Magento Observer Execute Method";

0 commit comments

Comments
 (0)