Skip to content
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

Boolean fields in D8 #124

Open
jonathanjfshaw opened this issue Jan 26, 2017 · 0 comments
Open

Boolean fields in D8 #124

jonathanjfshaw opened this issue Jan 26, 2017 · 0 comments

Comments

@jonathanjfshaw
Copy link
Contributor

It would be nice to do

Given an "article" content:
| title | promote |
| test  | Yes         |

instead of

Given an "article" content:
| title | promote |
| test  | 1            |

Using numeric values for booleans does not seem good BDD.
#44 seems to address the issue for D7; looks like we need a BooleanHandler for D8.

My suggestion is to try to use the field's 'off_label' and 'on_label' settings; if that fails then try true/false, 0/1, one/off, yes/no. If the value does not match any of these, throw an exception.

Doing this in a translation-sensitive way will be the clever part.

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

No branches or pull requests

1 participant