Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update templates.rst for PR symfony/symfony#41414#15376

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@dayallnash
Copy link
Contributor

Update docs to provide info on potential new feature found here:symfony/symfony#41414

Update docs to provide info on potential new feature found here:symfony/symfony#41414
@dayallnashdayallnash changed the titleUpdate templates.rstUpdate templates.rst for PR symfony/symfony#41414May 26, 2021
@javiereguiluzjaviereguiluz added the Waiting Code MergeDocs for features pending to be merged labelMay 26, 2021
@carsonbotcarsonbot added this to thenext milestoneMay 26, 2021
fabpot added a commit to symfony/symfony that referenced this pull requestOct 27, 2021
…te directly via route (dayallnash)This PR was merged into the 5.4 branch.Discussion----------Support `statusCode` default param when loading template directly via route_This is my first PR to Symfony, so please be patient as I get to grips with the 'admin' process of getting everything exactly how you want it!_| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Tickets       || License       | MIT| Doc PR        |symfony/symfony-docs#15376### TODO- [x] submit changes to the documentation and update this PR with a link### SummaryAdded support for `statusCode` default parameter when loading a template directly from route via the `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` controller (like [this](https://symfony.com/doc/current/templates.html#templates-render-from-route)). This will continue to default to a 200 code, but can be changed by updating your route - for instance something like this:```test_route:  path: /test_route  controller:    Symfony\Bundle\FrameworkBundle\Controller\TemplateController  defaults:    # the path of the template to render    template:  'test.html.twig'    # the status code to include in the response headers    statusCode: 201```This could be useful for when you want to render a template without adding any extra business logic in a controller, but don't want to return a 200 response.Commits-------5a7b666 Added support for `statusCode` default parameter when loading a template directly from route using the `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` controller.
@fabpotfabpot removed the Waiting Code MergeDocs for features pending to be merged labelOct 27, 2021
@javiereguiluzjaviereguiluz modified the milestones:next,5.4Dec 2, 2021
@javiereguiluz
Copy link
Member

Thanks Dale!

@javiereguiluzjaviereguiluz merged commitf852ac9 intosymfony:5.4Dec 2, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

+1 more reviewer

@94noni94noni94noni left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@dayallnash@javiereguiluz@fabpot@94noni@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp