|
15 | 15 | {{ include('blog/_post_tags.html.twig') }}
|
16 | 16 |
|
17 | 17 | <div id="post-add-comment" class="well">
|
18 |
| - {# The 'IS_AUTHENTICATED_FULLY' role ensures that the user has entered |
19 |
| - their credentials (login + password) during this session. If they |
20 |
| - are automatically logged via the 'Remember Me' functionality, they won't |
21 |
| - be able to add a comment. |
22 |
| - See https://symfony.com/doc/current/security/remember_me.html#forcing-the-user-to-re-authenticate-before-accessing-certain-resources |
| 18 | + {# |
| 19 | + The 'IS_AUTHENTICATED_FULLY' role ensures that the user has entered |
| 20 | + their credentials (login + password) during this session. If they |
| 21 | + are automatically logged via the 'Remember Me' functionality, they won't |
| 22 | + be able to add a comment. |
| 23 | + See https://symfony.com/doc/current/security/remember_me.html#forcing-the-user-to-re-authenticate-before-accessing-certain-resources |
23 | 24 | #}
|
24 | 25 | {% if is_granted('IS_AUTHENTICATED_FULLY') %}
|
25 |
| - {# when the name of the Twig argument is the same as the name of the variable, you can omit it. |
26 |
| - e.g. instead of controller('...', {post: post}) you can use controller('...', {post}) #} |
| 26 | + {# |
| 27 | + When the name of the Twig argument is the same as the name of the variable, you can omit it. |
| 28 | + e.g. instead of controller('...', {post: post}) you can use controller('...', {post}) |
| 29 | + #} |
27 | 30 | {{ render(controller('App\\Controller\\BlogController::commentForm', {post})) }}
|
28 | 31 | {% else %}
|
29 | 32 | <p>
|
|
44 | 47 | <a name="comment_{{ comment.id }}"></a>
|
45 | 48 | <h4 class="col-sm-3">
|
46 | 49 | <strong>{{ comment.author.fullName }}</strong> {{ 'post.commented_on'|trans }}
|
47 |
| - {# it's not mandatory to set the timezone in localizeddate(). This is done to |
48 |
| - avoid errors when the 'intl' PHP extension is not available and the application |
49 |
| - is forced to use the limited "intl polyfill", which only supports UTC and GMT #} |
| 50 | + {# |
| 51 | + It's not mandatory to set the timezone in format_datetime(). This is done to |
| 52 | + avoid errors when the 'intl' PHP extension is not available and the application |
| 53 | + is forced to use the limited "intl polyfill", which only supports UTC and GMT |
| 54 | + #} |
50 | 55 | <strong>{{ comment.publishedAt|format_datetime('medium', 'short', '', 'UTC') }}</strong>
|
51 | 56 | </h4>
|
52 | 57 | <div class="col-sm-9">
|
|
69 | 74 | </div>
|
70 | 75 | {% endif %}
|
71 | 76 |
|
72 |
| - {# the parent() function includes the contents defined by the parent template |
73 |
| - ('base.html.twig') for this block ('sidebar'). This is a very convenient way |
74 |
| - to share common contents in different templates #} |
| 77 | + {# |
| 78 | + The parent() function includes the contents defined by the parent template |
| 79 | + ('base.html.twig') for this block ('sidebar'). This is a very convenient way |
| 80 | + to share common contents in different templates |
| 81 | + #} |
75 | 82 | {{ parent() }}
|
76 | 83 |
|
77 | 84 | {{ show_source_code(_self) }}
|
|
0 commit comments