0

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?

1 Answer 1

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.

3
  • 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, 2013 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. Jan 16, 2013 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, 2013 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.