*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / View / Helper / FormHidden.php
blob5634d7b1dfd48c5cd07ecb2bba2726d19d33590e
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_View
17 * @subpackage Helper
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: FormHidden.php 16541 2009-07-07 06:59:03Z bkarwin $
24 /**
25 * Abstract class for extension
27 require_once 'Zend/View/Helper/FormElement.php';
30 /**
31 * Helper to generate a "hidden" element
33 * @category Zend
34 * @package Zend_View
35 * @subpackage Helper
36 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
37 * @license http://framework.zend.com/license/new-bsd New BSD License
39 class Zend_View_Helper_FormHidden extends Zend_View_Helper_FormElement
41 /**
42 * Generates a 'hidden' element.
44 * @access public
46 * @param string|array $name If a string, the element name. If an
47 * array, all other parameters are ignored, and the array elements
48 * are extracted in place of added parameters.
49 * @param mixed $value The element value.
50 * @param array $attribs Attributes for the element tag.
51 * @return string The element XHTML.
53 public function formHidden($name, $value = null, array $attribs = null)
55 $info = $this->_getInfo($name, $value, $attribs);
56 extract($info); // name, value, attribs, options, listsep, disable
57 if (isset($id)) {
58 if (isset($attribs) && is_array($attribs)) {
59 $attribs['id'] = $id;
60 } else {
61 $attribs = array('id' => $id);
64 return $this->_hidden($name, $value, $attribs);