PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/content/code/trunk/administrator/components/com_artofcontent/libraries/jxtended/form/fields/textarea.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 45 lines | 15 code | 5 blank | 25 comment | 1 complexity | bae7261fab1f4e633074149adae8f7ad MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: textarea.php 484 2010-12-20 23:40:27Z eddieajau $
  4. * @package JXtended.Libraries
  5. * @subpackage Form
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License
  8. * @link http://www.theartofjoomla.com
  9. */
  10. defined('JPATH_BASE') or die;
  11. juimport('jxtended.form.formfield');
  12. /**
  13. * Form Field class for JXtended Libraries.
  14. *
  15. * @package JXtended.Libraries
  16. * @subpackage Form
  17. * @since 1.1
  18. */
  19. class JFormFieldTextarea extends JFormField
  20. {
  21. /**
  22. * The field type.
  23. *
  24. * @var string
  25. */
  26. protected $type = 'Textarea';
  27. /**
  28. * Method to get the field input.
  29. *
  30. * @return string The field input.
  31. */
  32. protected function _getInput()
  33. {
  34. $rows = $this->_element->attributes('rows');
  35. $cols = $this->_element->attributes('cols');
  36. $class = $this->_element->attributes('class') ? 'class="'.$this->_element->attributes('class').'"' : 'class="text_area"';
  37. $readonly = $this->_element->attributes('readonly') == 'true' ? ' readonly="readonly"' : '';
  38. return '<textarea name="'.$this->inputName.'" cols="'.$cols.'" rows="'.$rows.'" '.$class.$readonly.' id="'.$this->inputId.'" >'.htmlspecialchars($this->value).'</textarea>';
  39. }
  40. }