I want to extend the ZfcUser module, but i do not want to edit the original ZfcUser files. How can i extend files like the module.php, the view and form files? or is it even possible to extend the complete module?
Asked
Active
Viewed 904 times
1 Answers
2
For what reason do you need to extend the ZfcUser\Module
class? In most cases, you have the ability to do it in a custom user module class, say MyUser\Module
.
For other features, check out my answer to the question ZF2, what's the best practice for working with Vendor Module's Form classes? and the blogpst I created based on that afterwards. The question on SO uses still the old mechanism of Zend\Di
but my blog post is updated to use the Zend\ServiceManager
approach.

Community
- 1
- 1

Jurian Sluiman
- 13,498
- 3
- 67
- 99
-
Thanks for the Tutorial. The Form is shown, but when i submit the form the values of the new fields are not submitted. I am using ZfcUser with ZfCUserDoctrine. I get an SQLError that the fields can not be null. – Iceman Jan 16 '13 at 13:17
-
Check what values are populated in the form. You might have made a mistake in the filter. If in the filter the values aren't defined, you can't get them through to the entity. – Jurian Sluiman Jan 16 '13 at 13:38
-
For Every attribute i use this simple filter: `$filter->add(array('name' => 'zipCode', 'required' => true));` Do i need to extend a special function where the data is processed? – Iceman Jan 16 '13 at 18:50