Alexis_D
Alexis_D

Reputation: 1958

Difference between render(url('url_name')) and render(controller('controller_name')?

Is there a difference between thoses 2 lignes?

render(url('hwi_oauth_connect'));
render(controller("HWIOAuthBundle:Connect:connect"));

with route being (xml):

hwi_oauth_connect:    
path: /login/    
defaults: {_controller: HWIOAuthBundle:Connect:connect }

Upvotes: 0

Views: 2085

Answers (1)

Roukmoute
Roukmoute

Reputation: 779

No there is not a difference. You use render().
In french documentation, it's all the same thing for renders the fragment for the given controller or URI:

  • render(uri, options = {})
  • render(controller('B:C:a', {params}))
  • render(path('route', {params}))
  • render(url('route', {params}))

Upvotes: 2

Related Questions