-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
$metadata->mapChildren([ | ||
'fieldName' => $fieldName, | ||
'fetchDepth' => 1, | ||
'filter' => 'cmfct:' . $fieldName . '-*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use constant.
4a96bdb
to
36464ae
Compare
]; | ||
} | ||
|
||
public function getType($type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing doc
aae4dd9
to
c0b6cc3
Compare
This is failing with SF 2.8 because of the Form changes. In this PR we instantiate the form type (via a form extension) based on the model, e.g. I thought about adding some BC hacks of our own, but then it is going to be some months (years?) before this is stable and 3.0 is already out. |
92b82a9
to
46726f5
Compare
this is a new library, lets not bother with symfony 2 if its an obstacle.
|
2.8 should behave exactly the same as 3.0, can you please show where we need BC hacks here? |
@wouterj it is because of the BC hacks in 2.8. In 3.0 the extension is directly responsible for providing the form, and it can therefore return any type, in this case a In 2.8 this is not possible.. Afraid I havn't got much time to look into it and remember exactly why now. But will try and have a look before merging this. |
@wouterj it is because the 2.8 system uses the class name of the object returned by the extension as the "type name". In this case that object is always of type The In 2.8 we would never find a form type for 3.x allows us to request a form type for "X" and it doesn't matter what "X" is, and it doesn't matter what the form type is. In our case it can be dynamic and primed with the metadata for "X". Does that sound OK? /cc @webmozart |
)); | ||
} | ||
|
||
$surrogteType = new SurrogateType( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo $surrogteType
- Added CollectionField - Support for storing collections in PHPCR-ODM - Added form extension.
46726f5
to
82c825b
Compare
Merging this now -- as for the method used to resolve the form type, I am not even sure it is the best solution, it might ultimately be better to have a dedicated form factory here at the cost of not being able to seamlessly integrate with things like the Sylius resource bundle. But lets see how things pan out. |
Support for storing collections.
For example:
Mapping: