score:0

Accepted answer

Finally I get the solution myself. You just need to route all the routes by your own way:

   //app/config/routing.yml

 sg_calendar:
    path: /calendar
    defaults: { _controller: SgCalendarBundle:Calendar:index }

sg_calendar_create_event:
     path: /calendar/event/new
     defaults: { _controller: SgCalendarBundle:Event:new }

sg_calendar_create_calendar:
     path: /calendar/create
     defaults: { _controller: SgCalendarBundle:Calendar:get }

sg_calendar_update_xhr_event:
     path: /calendar/event/update
     defaults: { _controller: SgCalendarBundle:Event:update }

sg_calendar_new_calendar:
     path: /calendar/new
     defaults: { _controller: SgCalendarBundle:Calendar:new }

sg_calendar_new_event:
     path: /calendar/event/new
     defaults: { _controller: SgCalendarBundle:Event:new }

sg_calendar_get_calendar:
     path: /calendar/{id}/show
     defaults: { _controller: SgCalendarBundle:Calendar:get }

sg_calendar_edit_calendar:
     path: /calendar/{id}/edit
     defaults: { _controller: SgCalendarBundle:Calendar:edit }

sg_calendar_remove_calendar:
     path: /calendar/{id}/remove
     defaults: { _controller: SgCalendarBundle:Calendar:remove }

sg_calendar_get_xhr_events:
     path: /calendar/event/{id}/show
     defaults: { _controller: SgCalendarBundle:Event:get }

sg_calendar_update_calendar:
     path: /calendar/{id}/update
     defaults: { _controller: SgCalendarBundle:Calendar:update }

score:3

Routes by annotations need to be imported into routing.yml:

# app/config/routing.yml

# SgRruleBundle
sg_rrule:
    resource: "@SgRruleBundle/Controller/"
    type:     annotation
    prefix:   /

# SgCalendarBundle
sg_calendar:
    resource: "@SgCalendarBundle/Controller/"
    type:     annotation
    prefix:   /

This documentation issue was fixed: https://github.com/stwe/CalendarBundle/issues/1


Related Query

More Query from same tag