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\File
;
12 use Zend\Form\ElementInterface
;
13 use Zend\Form\View\Helper\FormInput
;
16 * A view helper to render the hidden input with a UploadProgress id
17 * for file uploads progress tracking.
19 class FormFileUploadProgress
extends FormInput
22 * Invoke helper as functor
24 * Proxies to {@link render()}.
26 * @param ElementInterface|null $element
29 public function __invoke(ElementInterface
$element = null)
31 return $this->renderHiddenId();
35 * Render a hidden form <input> element with the progress id
39 public function renderHiddenId()
41 $attributes = array();
42 $attributes['id'] = 'progress_key';
43 $attributes['name'] = $this->getName();
44 $attributes['type'] = 'hidden';
45 $attributes['value'] = $this->getValue();
49 $this->createAttributesString($attributes),
50 $this->getInlineClosingBracket()
57 protected function getName()
59 return 'UPLOAD_IDENTIFIER';
65 protected function getValue()