Skip to content

Commit

Permalink
Merge pull request #2250 from Haehnchen/feature/render-block-controller
Browse files Browse the repository at this point in the history
Support block render template parameter from "Render Blocks from Controllers"
  • Loading branch information
Haehnchen authored Nov 27, 2023
2 parents 90d9149 + 716710b commit 70fc5dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public class SymfonyPhpReferenceContributor extends PsiReferenceContributor {

new MethodMatcher.CallToSignature("\\Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail", "htmlTemplate"),
new MethodMatcher.CallToSignature("\\Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail", "textTemplate"),

// Symfony 6.4
new MethodMatcher.CallToSignature("\\Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController", "renderBlock"),
new MethodMatcher.CallToSignature("\\Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController", "renderBlockView"),
};

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public static void processMethodReference(@NotNull MethodReference methodReferen
return;
}

if (!methods.get().contains(methodName) && Stream.of("render", "htmltemplate", "texttemplate").noneMatch(s -> methodName.toLowerCase().contains(s))) {
if (!methods.get().contains(methodName) && Stream.of("render", "htmltemplate", "texttemplate", "renderblock", "renderblockview").noneMatch(s -> methodName.toLowerCase().contains(s))) {
return;
}

Expand Down

0 comments on commit 70fc5dd

Please sign in to comment.