Skip to content

Commit b889e5e

Browse files
committed
Added XML routing
1 parent 6270125 commit b889e5e

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

Resources/config/routing.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<routes xmlns="http://symfony.com/schema/routing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
3+
<import resource="./routing/hackzilla_ticket.xml" type="xml" prefix="/ticket"/>
4+
</routes>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<routes xmlns="http://symfony.com/schema/routing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
3+
<route id="hackzilla_ticket" path="/" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketController::indexAction"/>
4+
<route id="hackzilla_ticket_show" path="/{ticketId}/show" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketController::showAction"/>
5+
<route id="hackzilla_ticket_new" path="/new" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketController::newAction"/>
6+
<route id="hackzilla_ticket_create" path="/create" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketController::createAction" methods="POST"/>
7+
<route id="hackzilla_ticket_delete" path="/{ticketId}/delete" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketController::deleteAction" methods="DELETE|POST"/>
8+
<route id="hackzilla_ticket_reply" path="/{ticketId}/reply" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketController::replyAction"/>
9+
<route id="hackzilla_ticket_attachment" path="/attachment/{ticketMessageId}/download" controller="Hackzilla\Bundle\TicketBundle\Controller\TicketAttachmentController::downloadAction"/>
10+
</routes>

Resources/config/routing/ticket.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# NEXT_MAJOR: remove this file and add upgrade note.
12
hackzilla_ticket:
23
path: /
34
controller: 'Hackzilla\Bundle\TicketBundle\Controller\TicketController::indexAction'

Resources/doc/setup/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ public function registerBundles()
6969

7070
``` yml
7171
hackzilla_ticket:
72-
resource: "@HackzillaTicketBundle/Resources/config/routing.yml"
72+
resource: "@HackzillaTicketBundle/Resources/config/routing.xml"
7373
prefix: /
7474
```
7575

7676
or
7777

7878
``` yml
7979
hackzilla_ticket:
80-
resource: "@HackzillaTicketBundle/Resources/config/routing/ticket.yml"
80+
resource: "@HackzillaTicketBundle/Resources/config/routing/hackzilla_ticket.xml"
8181
prefix: /ticket
8282
```
8383

0 commit comments

Comments
 (0)