Skip to content

Commit 7cace15

Browse files
committed
add auto "kernel.event_subscriber" tags detection on service builder Haehnchen#352
1 parent 6481881 commit 7cace15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/fr/adrienbrault/idea/symfony2plugin/action/ui/ServiceBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
public class ServiceBuilder {
2929

3030
final private static String TWIG_EXTENSION = "\\Twig_Extension";
31+
final private static String EVENT_SUBSCRIBER_INTERFACE = "\\Symfony\\Component\\EventDispatcher\\EventSubscriberInterface";
3132

3233
public enum OutputType {
3334
Yaml, XML,
@@ -303,6 +304,10 @@ private void serviceTagCallback(String className, TagCallbackInterface callback)
303304
callback.onTag("form.type_extension");
304305
}
305306

307+
if(new Symfony2InterfacesUtil().isInstanceOf(phpClass, EVENT_SUBSCRIBER_INTERFACE)) {
308+
callback.onTag("kernel.event_subscriber");
309+
}
310+
306311
}
307312
}
308313

0 commit comments

Comments
 (0)