V
V
Vitaly Melnikov2018-08-25 09:28:43
phpstorm
Vitaly Melnikov, 2018-08-25 09:28:43

How to set a file template for Twig in Storm with parameters output?

A couple of questions about the storm:
1. Can I set a file template for Twig in the storm so that it immediately displays the parameters of this template in the comments?
Those. for example from this file I click Twig Create Template - post.html.twig

$html = $this->twig->render('/blog/post.html.twig', [
            'id' => $id,
            'post' => $posts[$id],
        ]);

And in the template itself, something like
{##} with Live Edit turned on.
The output is post.html.twig
{#parametr - id#}
{#parametr - post#}
or
{# parametrs:
' id' => $id,
"post" => $posts[$id] , #
} now for this you need to use the hotkey ALT + F1 and select)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Melnikov, 2018-09-04
@Vmelnikoff

While I'm waiting for an answer to question 1, I've already found a solution to question 2, maybe someone else will come in handy:
In the Project settings, set - Autoscroll from source

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question