Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Updated choice_widget to display the preferred_choice separator only if c #2289

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

Closed
wants to merge 1 commit into from
Closed

Conversation

whattheken
Copy link

Updated choice_widget to display the preferred_choice separator only if choice|length >0 and separator is not blank.

…if choice|length >0 and separator is not blank.
@craue
Copy link
Contributor

craue commented Sep 28, 2011

How about {% if choices|length > 0 and separator is not empty %} instead?

@whattheken
Copy link
Author

That looks better. Thanks.

@fabpot
Copy link
Member

fabpot commented Sep 28, 2011

Can you also add some unit tests?

@craue
Copy link
Contributor

craue commented Sep 28, 2011

This change should also be made in the corresponding PHP template (as done in #1787).

@whattheken
Copy link
Author

@fabpot Never used PHPUnit tests before but I can give it a shot.

@fabpot
Copy link
Member

fabpot commented Sep 29, 2011

@Robotron2000 nevermind then, I will add some myself.

@whattheken
Copy link
Author

@craue Good idea. Make same changes to the PHP template.

@fabpot
Copy link
Member

fabpot commented Sep 29, 2011

done here: d429594

@fabpot fabpot closed this Sep 29, 2011
fabpot added a commit that referenced this pull request May 26, 2017
… in the kernel (aschempp)

This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Only override getProjectDir if it exists in the kernel

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22872, #2289
| License       | MIT
| Doc PR        | -

As discussed with @nicolas-grekas, the `getProjectDir` method does not belong to `KernelInterface` so it can't just be called. I think we should also not add the method to the kernel if it does not exist in the parent, because we would not have a useful value to return.

Commits
-------

c7ed08e Only override getProjectDir if it exists in the kernel
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