|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
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. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_View |
|
17 * @subpackage Helper |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 * @version $Id: FormNote.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
21 */ |
|
22 |
|
23 |
|
24 /** |
|
25 * Abstract class for extension |
|
26 */ |
|
27 require_once 'Zend/View/Helper/FormElement.php'; |
|
28 |
|
29 |
|
30 /** |
|
31 * Helper to show an HTML note |
|
32 * |
|
33 * @category Zend |
|
34 * @package Zend_View |
|
35 * @subpackage Helper |
|
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
38 */ |
|
39 class Zend_View_Helper_FormNote extends Zend_View_Helper_FormElement |
|
40 { |
|
41 /** |
|
42 * Helper to show a "note" based on a hidden value. |
|
43 * |
|
44 * @access public |
|
45 * |
|
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 * |
|
50 * @param array $value The note to display. HTML is *not* escaped; the |
|
51 * note is displayed as-is. |
|
52 * |
|
53 * @return string The element XHTML. |
|
54 */ |
|
55 public function formNote($name, $value = null) |
|
56 { |
|
57 $info = $this->_getInfo($name, $value); |
|
58 extract($info); // name, value, attribs, options, listsep, disable |
|
59 return $value; |
|
60 } |
|
61 } |