I have the following code in my templates in which I generate routes with parameters:
<a class="btn btn-block btn-abcd" href="{{ path( 'auth.login', { 'type': constant('User::TYPE_CANDIDATE'), 'provider': constant('UserProvider::PROVIDER_XING') } ) }}">...</a>
I split it into lines the way I did with PHP code. I'm just not sure if this is the recommended practice or not. The coding standards page on the Twig site does not address this specific issue.
, , , , //. , .
:
<a class="btn btn-block btn-abcd" href="{{ path( 'auth.login', { 'type': constant('User::TYPE_CANDIDATE'), 'provider': constant('UserProvider::PROVIDER_XING') } ) }}"> Link text </a>
, 50 .
PHP, , - Twig, {{ {%, <?php.
{{
{%
<?php
, , : https://github.com/cybtachyon/twig-standards.
Alec, Twig.
<a class="btn btn-block btn-abcd" href="{{ path( 'auth.login', { 'type': constant('User::TYPE_CANDIDATE'), 'provider': constant('UserProvider::PROVIDER_XING'), } ) }}"> Link text </a>