title: ZF2 change extends class
body: <p>The answer to my question <a href="https://stackoverflow.com/q/41716155/">ZF2 FormInput to show error class on validation fail</a> is to create my own form view helper, overriding the <code>render</code> function. While this works beautifully for elements being rendered using <code>forminput</code>, it doesn't help on elements that inherit from <code>forminput</code>. For example, <code>FormCheckbox</code> inherits from <code>forminput</code> but not MY <code>forminput</code>:</p>
  
  <pre><code>&lt;?php
  namespace Zend\Form\View\Helper;
  //...
  class FormCheckbox extends FormInput {
      //...
  }
  </code></pre>
  
  <p>In this case I would need to create ANOTHER form view helper for <code>formcheckbox</code> exclusively to extend MY <code>forminput</code>. And again for any other view helpers I want to include (<code>formdate</code>, <code>formemail</code>, <code>formpassword</code>, etc).</p>
  
  <p>Instead of creating multiple view helpers is it possible to create a single view helper and tell ZF2 to use that in all calls to the original view helper when made by a ZF2 view helper? </p>
  
  <p>i.e. <code>\Zend\Form\View\Helper\FormCheckbox</code> would extend <code>\RPK\Form\View\Helper\FormInput</code>, which would extend <code>\Zend\Form\View\Helper\FormInput</code>.</p>