Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

allow KeyValueContainer objects to be passed as key-value arrays #158

Merged
merged 1 commit into from
May 2, 2014

Conversation

Burgov
Copy link
Contributor

@Burgov Burgov commented May 2, 2014

fixed issues described in #255

@ElectricMaxxx
Copy link
Member

Nice, i will delete my PR :-), yours is better and recognized the the form option too.

->add('extraHttp', 'burgov_key_value', array('required' => false, 'value_type' => 'text'))
->add('extraProperties', 'burgov_key_value', array('required' => false, 'value_type' => 'text', 'use_container_object' => true))
->add('extraNames', 'burgov_key_value', array('required' => false, 'value_type' => 'text', 'use_container_object' => true))
->add('extraHttp', 'burgov_key_value', array('required' => false, 'value_type' => 'text', 'use_container_object' => true))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change to one parameter per line for the options array, please. getting longer now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

I decided to keep it D.R.Y. ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even better :-)

@@ -79,19 +81,19 @@ public function setTitle($title);
public function getTitle();

/**
* @param array
* @param array|KeyValueContainer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it OK like this, or should I remove the use statement and use FQDN's for all three methods?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, you did it the correct way :)

@Burgov
Copy link
Contributor Author

Burgov commented May 2, 2014

thx, I've updated the commit

dbu added a commit that referenced this pull request May 2, 2014
allow KeyValueContainer objects to be passed as key-value arrays
@dbu dbu merged commit 99c7dce into symfony-cmf:master May 2, 2014
@dbu
Copy link
Member

dbu commented May 2, 2014

thanks a lot for finding this solution!

@dbu
Copy link
Member

dbu commented May 2, 2014

created a follow-up PR in #159 about the traversable topic - i understood it does not work with the form layer, but it could be useful elsewhere.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants