*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Dojo / View / Helper / SimpleTextarea.php
blob793f15b04076e7a24c8992b8ad9a9ad530c75033
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_Dojo
17 * @subpackage View
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: SimpleTextarea.php 16971 2009-07-22 18:05:45Z mikaelkael $
23 /** Zend_Dojo_View_Helper_Dijit */
24 require_once 'Zend/Dojo/View/Helper/Dijit.php';
26 /**
27 * dijit.form.SimpleTextarea view helper
29 * @uses Zend_Dojo_View_Helper_Dijit
30 * @package Zend_Dojo
31 * @subpackage View
32 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
33 * @license http://framework.zend.com/license/new-bsd New BSD License
34 * @version $Id: SimpleTextarea.php 16971 2009-07-22 18:05:45Z mikaelkael $
36 class Zend_Dojo_View_Helper_SimpleTextarea extends Zend_Dojo_View_Helper_Dijit
38 /**
39 * @var string Dijit type
41 protected $_dijit = 'dijit.form.SimpleTextarea';
43 /**
44 * @var string HTML element type
46 protected $_elementType = 'textarea';
48 /**
49 * @var string Dojo module
51 protected $_module = 'dijit.form.SimpleTextarea';
53 /**
54 * dijit.form.SimpleTextarea
56 * @param string $id
57 * @param string $value
58 * @param array $params Parameters to use for dijit creation
59 * @param array $attribs HTML attributes
60 * @return string
62 public function simpleTextarea($id, $value = null, array $params = array(), array $attribs = array())
64 if (!array_key_exists('id', $attribs)) {
65 $attribs['id'] = $id;
67 $attribs['name'] = $id;
68 $attribs['type'] = $this->_elementType;
70 $attribs = $this->_prepareDijit($attribs, $params, 'textarea');
72 $html = '<textarea' . $this->_htmlAttribs($attribs) . '>'
73 . $this->view->escape($value)
74 . "</textarea>\n";
76 return $html;