Skip to content

Controller as a service when using annotated routing #1731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2012

Conversation

simensen
Copy link
Contributor

It was not immediately obvious to me if and how one would handle Controller as a service while using annotations for routing. It sounds like this is the correct solution. If there is a better way to describe this, or a more appropriate place to put this information, I'd be happy to make the change.

@richardmiller-zz
Copy link
Contributor

It its documented here - http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html

It is a bit hidden away though so maybe a more linking to it would be good

@simensen
Copy link
Contributor Author

@richardmiller Thanks for the link. I guess I missed it on that page. :-/ I could add a link to there from the Controller as a Service page. What is the best way to link to that page using this markup?

@richardmiller-zz
Copy link
Contributor

@simensen I'm not sure if you can link to those pages in the way you can with other pages in the docs. If you can then it will be

:doc:`bundles/SensioFrameworkExtraBundle/annotations/routing`

If it needs to be an external link then you can see some examples of this in the book/forms.rst page.

@weaverryan which is the correct way to link to pages in the bundles docs?

@weaverryan
Copy link
Member

Hi guys!

I agree with @richardmiller, and yes, in theory it should work exactly like you described. The external docs are basically cloned in, but they're part of the index. We can try it and then double-check on the errors page (http://symfony.com/doc/build_errors) afterwards.

Thanks!

@weaverryan
Copy link
Member

ping @simensen :)

@simensen
Copy link
Contributor Author

simensen commented Oct 3, 2012

@weaverryan my bad. :) i made a quick change and pushed it. is this what you guys were expecting? happy to keep hacking on it.

is there a way to be able to preview the docs? i don't know enough about sphinx to know if i can quickly bootstrap a project so i can see if this stuff is rendering correctly. let me know. hopefully i didn't miss something somewhere and this is already easy to do. :)

weaverryan added a commit that referenced this pull request Oct 7, 2012
Controller as a service when using annotated routing
@weaverryan weaverryan merged commit fb9ceeb into symfony:2.0 Oct 7, 2012
weaverryan added a commit that referenced this pull request Oct 7, 2012
@weaverryan
Copy link
Member

Hey Beau!

I've merged this in - I moved it down a bit, but it looks great! Right now, there is no automated way to preview the docs. We might get there, that would be really cool :). I double-checked it locally however, and it rendered just fine (including the link to the bundle).

Thanks!

@simensen
Copy link
Contributor Author

simensen commented Oct 8, 2012

Sounds good! Glad it worked. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants