Skip to content

[Form] Rename "virtual" to "inherit_data" #5899

Closed
@webmozart

Description

@webmozart

I propose to rename the "virtual" option to "inherit_data". The reasoning is quite simple: While it is necessary to explain what a "virtual form" is, the name "inherit_data" is self-explanatory, namely that the form inherits the data from its parent form.

$data = array(
    'name' => 'Foo',
    'street' => 'Bar'
);

$builder
    ->add('name', 'text')
    // e.g. a fieldset
    ->add('address', 'form', array('inherit_data' => true))
;

$builder->get('address')
    ->add('street', 'text')
;

Fieldsets can then be added to core by extending form, setting "inherit_data" to true and adding custom rendering code.

Thoughts?

Update:

BC will be kept until 2.3.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions