Skip to content

Conversation

@Maks3w
Copy link
Contributor

@Maks3w Maks3w commented Jan 26, 2012

I added the most relevant fields inherited by Hidden type

Reference symfony/symfony#3182

@stof
Copy link
Member

stof commented Jan 26, 2012

Well, I think this should be improved. each type inherits all options of its parent so doing this will duplicate lots of things (and be hard to maintain). currently, we don't add a section with inherited options.

And btw, how would you create this section for types that can have different parents depending of some options ?

@stof
Copy link
Member

stof commented Jan 26, 2012

However, adding the parent is indeed needed

@weaverryan
Copy link
Member

Yes, we need to add a lot more options - with the include, we should be able to minimize duplication. I have two other thoughts:

  • Sometimes we should not show an option if it doesn't make sense for a field. For example, showing the read_only field for the hidden field it technically correct, but I don't think it's helpful
  • In some cases, an option will be slightly different for one field type. In this case, we just won't be able to reuse the include for that field type - the option for that one field type will just need to be rewritten custom. It's not 100% ideal, but it's not so common.

So, we will need more of this! For example #998.

I've patched in this commit to the 2.0 branch at sha: a8842a3

Thanks for the contribution!

@weaverryan weaverryan closed this Jan 31, 2012
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