Collection<AnAction> urlActions = new ArrayList<AnAction>();
Collection<AnAction> mailActions = new ArrayList<AnAction>();
for(ProfilerRequest profilerRequest : requests) {
DefaultDataCollector collector = profilerRequest.getCollector(DefaultDataCollector.class);
String statusCode = collector.getStatusCode();
urlActions.add(new SymfonyProfilerWidgetActions.UrlAction(this.project, profilerRequest, statusCode));
// regular expression fails on current version (because of multiple mailer)
// ArrayList<MailMessage> messages = profilerRequest.getCollector(MailCollector.class).getMessages();
// @TODO: use collector
String content = profilerRequest.getContent();
if(content != null && content.contains("Swift_Mime_Headers_MailboxHeader")) {
mailActions.add(new SymfonyProfilerWidgetActions.UrlAction(this.project, profilerRequest, statusCode).withPanel("swiftmailer").withIcon(Symfony2Icons.MAIL));
}
attachProfileItem(templateActions, templateActionsMap, collector.getTemplate(), ProfilerTarget.TEMPLATE);
attachProfileItem(routeActions, routeActionsMap, collector.getRoute(), ProfilerTarget.ROUTE);
attachProfileItem(controllerActions, controllerActionsMap, collector.getController(), ProfilerTarget.CONTROLLER);
}
// routes