Skip to content

Commit db3c24e

Browse files
committed
patch #145 Use Twig namespaced paths (phansys)
This PR was merged into the master branch. Discussion ---------- |Q |A | |--- |--- | |Branch |master| |Bug fix? |no | |New feature? |no | |BC breaks? |no | |Deprecations?|no | |Tests pass? |yes | |Fixed tickets|n/a | |License |MIT | |Doc PR |n/a | Commits ------- e0c302a Use Twig namespaced paths
2 parents 871e878 + e0c302a commit db3c24e

6 files changed

Lines changed: 22 additions & 22 deletions

File tree

DependencyInjection/Configuration.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public function getConfigTreeBuilder()
4040
->addDefaultsIfNotSet()
4141
->canBeUnset()
4242
->children()
43-
->scalarNode('index')->defaultValue('HackzillaTicketBundle:Ticket:index.html.twig')->end()
44-
->scalarNode('new')->defaultValue('HackzillaTicketBundle:Ticket:new.html.twig')->end()
45-
->scalarNode('prototype')->defaultValue('HackzillaTicketBundle:Ticket:prototype.html.twig')->end()
46-
->scalarNode('show')->defaultValue('HackzillaTicketBundle:Ticket:show.html.twig')->end()
47-
->scalarNode('show_attachment')->defaultValue('HackzillaTicketBundle:Ticket:show_attachment.html.twig')->end()
48-
->scalarNode('macros')->defaultValue('HackzillaTicketBundle:Macros:macros.html.twig')->end()
43+
->scalarNode('index')->defaultValue('@HackzillaTicket/Ticket/index.html.twig')->end()
44+
->scalarNode('new')->defaultValue('@HackzillaTicket/Ticket/new.html.twig')->end()
45+
->scalarNode('prototype')->defaultValue('@HackzillaTicket/Ticket/prototype.html.twig')->end()
46+
->scalarNode('show')->defaultValue('@HackzillaTicket/Ticket/show.html.twig')->end()
47+
->scalarNode('show_attachment')->defaultValue('@HackzillaTicket/Ticket/show_attachment.html.twig')->end()
48+
->scalarNode('macros')->defaultValue('@HackzillaTicket/Macros/macros.html.twig')->end()
4949
->end()
5050
->end()
5151
->end()

Resources/views/Ticket/index.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% extends 'HackzillaTicketBundle::layout.html.twig' %}
2-
{% import hackzilla_ticket.templates.macros as macros %}
1+
{% extends '@HackzillaTicket/layout.html.twig' %}
2+
{% import 'hackzilla_ticket.templates.macros' as macros %}
33

44
{% block hackzilla_ticket_content -%}
55
<h1>{{ 'HEADING_TICKET_LIST'|trans({}, 'HackzillaTicketBundle') }}</h1>
@@ -67,7 +67,7 @@
6767
</tbody>
6868
</table>
6969
<div class="navigation text-right">
70-
{{ knp_pagination_render(pagination, 'KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig') }}
70+
{{ knp_pagination_render(pagination, '@KnpPaginator/Pagination/twitter_bootstrap_v3_pagination.html.twig') }}
7171
</div>
7272

7373
{% endblock %}

Resources/views/Ticket/new.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends 'HackzillaTicketBundle::layout.html.twig' %}
1+
{% extends '@HackzillaTicket/layout.html.twig' %}
22

33
{% block hackzilla_ticket_content -%}
44
<h1>{{ 'HEADING_NEW_TICKET'|trans({}, 'HackzillaTicketBundle') }}</h1>
@@ -14,9 +14,9 @@
1414
</div>
1515

1616
{% if form.messages|length == 0 %}
17-
{% include hackzilla_ticket.templates.prototype with {'form': form.messages.vars.prototype} %}
17+
{% include 'hackzilla_ticket.templates.prototype' with {'form': form.messages.vars.prototype} %}
1818
{% else %}
19-
{% include hackzilla_ticket.templates.prototype with {'form': form.messages.__name__} %}
19+
{% include 'hackzilla_ticket.templates.prototype' with {'form': form.messages.__name__} %}
2020
{% endif %}
2121

2222
{{ form_rest(form) }}

Resources/views/Ticket/show.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% extends 'HackzillaTicketBundle::layout.html.twig' %}
2-
{% import 'HackzillaTicketBundle:Macros:macros.html.twig' as macros %}
1+
{% extends '@HackzillaTicket/layout.html.twig' %}
2+
{% import '@HackzillaTicket/Macros/macros.html.twig' as macros %}
33

44
{% block hackzilla_ticket_content -%}
55

@@ -66,7 +66,7 @@
6666
{% if form is defined %}
6767
<div class="well well-sm">
6868
{{ form_start(form, {'method': 'POST', 'action': path('hackzilla_ticket_reply', {'ticketId': ticket.id})}) }}
69-
{% include hackzilla_ticket.templates.prototype with {'form': form} %}
69+
{% include 'hackzilla_ticket.templates.prototype' with {'form': form} %}
7070

7171
{{ form_rest(form) }}
7272

Resources/views/layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends '::base.html.twig' %}
1+
{% extends 'base.html.twig' %}
22

33
{% block body %}
44
{% block hackzilla_ticket_content %}{% endblock %}

Tests/Functional/FunctionalTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ public function getParameters()
3030
['hackzilla_ticket.model.message.class', TicketMessage::class],
3131
['hackzilla_ticket.features', ['attachment' => true]],
3232
['hackzilla_ticket.templates', [
33-
'index' => 'HackzillaTicketBundle:Ticket:index.html.twig',
34-
'new' => 'HackzillaTicketBundle:Ticket:new.html.twig',
35-
'prototype' => 'HackzillaTicketBundle:Ticket:prototype.html.twig',
36-
'show' => 'HackzillaTicketBundle:Ticket:show.html.twig',
37-
'show_attachment' => 'HackzillaTicketBundle:Ticket:show_attachment.html.twig',
38-
'macros' => 'HackzillaTicketBundle:Macros:macros.html.twig',
33+
'index' => '@HackzillaTicket/Ticket/index.html.twig',
34+
'new' => '@HackzillaTicket/Ticket/new.html.twig',
35+
'prototype' => '@HackzillaTicket/Ticket/prototype.html.twig',
36+
'show' => '@HackzillaTicket/Ticket/show.html.twig',
37+
'show_attachment' => '@HackzillaTicket/Ticket/show_attachment.html.twig',
38+
'macros' => '@HackzillaTicket/Macros/macros.html.twig',
3939
]],
4040
];
4141
}

0 commit comments

Comments
 (0)