Dojo SimpleTextArea view helper
1 2 3 4 56 7 8 9 1011 12 13 14 1516 17 18 19 2021 22 23 24 2526 27 28 29 3031 32 33 34 3536 37 38 39 4041 42 43 44 4546 47 48 49 5051 52 53 54 5556 57 | <?php /** Zend_Dojo_View_Helper_Dijit */ require_once 'Zend/Dojo/View/Helper/Dijit.php'; /*** dijit.form.SimpleTextarea view helper * * @uses Zend_Dojo_View_Helper_Dijit * @category My * @package My_View* @subpackage Helper * @license New BSD {@link http://framework.zend.com/license/new-bsd} * @version $Id: $ */ class My_View_Helper_SimpleTextarea extends Zend_Dojo_View_Helper_Dijit{ /** * @var string Dijit type */ protected $_dijit = 'dijit.form.SimpleTextarea'; /** * @var string HTML element type */ protected $_elementType = 'textarea'; /** * @var string Dojo module */ protected $_module = 'dijit.form.SimpleTextarea'; /** * dijit.form.SimpleTextarea * * @param string $id* @param string $value * @param array $params Parameters to use for dijit creation * @param array $attribs HTML attributes * @return string */ public function simpleTextarea($id, $value = null, array $params = array(), array $attribs = array()) { if (!array_key_exists('id', $attribs)) { $attribs['id'] = $id; } $attribs['name'] = $id; $attribs['type'] = $this->_elementType; $attribs = $this->_prepareDijit($attribs, $params, 'textarea'); $html = '<textarea' . $this->_htmlAttribs($attribs) . '>' . $this->view->escape($value) . "</textarea>n"; return $html; } } |
Comments
You must login before commenting on a snippet. If you do not have an account, please register.
Snippet description
This is a view helper found in Matthew Weier O'Phinney's pastebin demo application
http://github.com/weierophinney/pastebin/tree/master
Snippet details
- Created:
-
davedevelopment
- Edited:
-
davedevelopment
- Revision Id:
- 5
- Edit Message:
- Initial Release
- Tags:
- view helper dojo
- Comments:
- 0
- Views:
- 120
- Points:
- 0 (0 votes)