String serviceClass = getServiceCollector().resolve(name);
if (serviceClass != null) {
PhpClass phpClass = PhpElementsUtil.getClassInterface(this.project, serviceClass);
if(phpClass != null) {
processor.process(new NavigationItemEx(phpClass, containerService.getName(), containerService.isWeak() ? Symfony2Icons.SERVICE_PRIVATE_OPACITY : Symfony2Icons.SERVICE, "Service"));
}
}
}
}
if(getTemplateMap().containsKey(name)) {
VirtualFile virtualFile = getTemplateMap().get(name);
PsiFile psiFile = PsiManager.getInstance(this.project).findFile(virtualFile);
if(psiFile != null) {
processor.process(new NavigationItemEx(psiFile, name, psiFile.getFileType().getIcon(), "Template"));
}
}
if(getRoutes().containsKey(name)) {
String controllerName = getRoutes().get(name).getController();
if(controllerName != null) {
for(PsiElement psiElement: RouteHelper.getMethodsOnControllerShortcut(this.project, controllerName)) {
processor.process(new NavigationItemEx(psiElement, name, Symfony2Icons.ROUTE, "Route"));
}
}
}
if(getTwigMacroSet().contains(name)) {
for(PsiElement macroTarget: TwigHelper.getTwigMacroTargets(project, name)) {
processor.process(new NavigationItemEx(macroTarget, name, TwigIcons.TwigFileIcon, "Macro"));
}
}
if(getModelLookupElements().containsKey(name)) {
PsiElement[] psiElements = EntityHelper.getModelPsiTargets(this.project, name);
getModelLookupElements().get(name).getLookupString();
for(PsiElement target: psiElements) {
processor.process(new NavigationItemEx(target, name, target.getIcon(0), "Entity"));
}
}
}