File indexing completed on 2024-12-29 05:27:35
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Dojo 0017 * @subpackage View 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** Zend_Dojo_View_Helper_Dijit */ 0024 // require_once 'Zend/Dojo/View/Helper/Dijit.php'; 0025 0026 /** 0027 * dijit.form.SimpleTextarea view helper 0028 * 0029 * @uses Zend_Dojo_View_Helper_Dijit 0030 * @package Zend_Dojo 0031 * @subpackage View 0032 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0033 * @license http://framework.zend.com/license/new-bsd New BSD License 0034 * @version $Id$ 0035 */ 0036 class Zend_Dojo_View_Helper_SimpleTextarea extends Zend_Dojo_View_Helper_Dijit 0037 { 0038 /** 0039 * @var string Dijit type 0040 */ 0041 protected $_dijit = 'dijit.form.SimpleTextarea'; 0042 0043 /** 0044 * @var string HTML element type 0045 */ 0046 protected $_elementType = 'textarea'; 0047 0048 /** 0049 * @var string Dojo module 0050 */ 0051 protected $_module = 'dijit.form.SimpleTextarea'; 0052 0053 /** 0054 * dijit.form.SimpleTextarea 0055 * 0056 * @param string $id 0057 * @param string $value 0058 * @param array $params Parameters to use for dijit creation 0059 * @param array $attribs HTML attributes 0060 * @return string 0061 */ 0062 public function simpleTextarea($id, $value = null, array $params = array(), array $attribs = array()) 0063 { 0064 if (!array_key_exists('id', $attribs)) { 0065 $attribs['id'] = $id; 0066 } 0067 $attribs['name'] = $id; 0068 0069 $attribs = $this->_prepareDijit($attribs, $params, 'textarea'); 0070 0071 $html = '<textarea' . $this->_htmlAttribs($attribs) . '>' 0072 . $this->view->escape($value) 0073 . "</textarea>\n"; 0074 0075 return $html; 0076 } 0077 }