3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Form\View\Helper
;
12 use Zend\Form\ElementInterface
;
13 use Zend\Form\Exception
;
15 class FormImage
extends FormInput
18 * Attributes valid for the input tag type="image"
22 protected $validTagAttributes = array(
29 'formenctype' => true,
31 'formnovalidate' => true,
40 * Render a form <input> element from the provided $element
42 * @param ElementInterface $element
43 * @throws Exception\DomainException
46 public function render(ElementInterface
$element)
48 $src = $element->getAttribute('src');
50 throw new Exception\
DomainException(sprintf(
51 '%s requires that the element has an assigned src; none discovered',
56 return parent
::render($element);
60 * Determine input type to use
62 * @param ElementInterface $element
65 protected function getType(ElementInterface
$element)