1. sfWidgetFormTextarea.class.php
  2. /** * sfWidgetFormTextarea represents a textarea HTML tag. * * @package symfony * @subpackage widget * @author Fabien Potencier * @version SVN: $Id: sfWidgetFormTextarea.class.php 9046 2008-05-19 08:13:51Z FabianLange $ */
  3. class sfWidgetFormTextarea extends sfWidgetForm
  4. {
  5. /**
  6. * @param array $options An array of options
  7. * @param array $attributes An array of default HTML attributes
  8. *
  9. * @see sfWidgetForm
  10. */
  11. protected function configure($options = array(), $attributes = array())
  12. {
  13. $this->setAttribute('rows', 4);
  14. $this->setAttribute('cols', 30);
  15. }
  16. /**
  17. * @param string $name The element name
  18. * @param string $value The value displayed in this widget
  19. * @param array $attributes An array of HTML attributes to be merged with the default HTML attributes
  20. * @param array $errors An array of errors for the field
  21. *
  22. * @return string An HTML tag string
  23. *
  24. * @see sfWidgetForm
  25. */
  26. public function render($name, $value = null, $attributes = array(), $errors = array())
  27. {
  28. return $this->renderContentTag('textarea', self::escapeOnce($value), array_merge(array('name' => $name), $attributes));
  29. }
  30. }

Debug toolbar