public static function textarea($name, $value, $label = '', $htmlAttributes = array()) { $itemData = array(); $itemData['name'] = $name; $itemData['value'] = $value; $itemData['label'] = $label; if ($label !== null && !isset($htmlAttributes['id'])) { $itemData['id'] = $name; } $itemData = array_merge($itemData, $htmlAttributes); $item = new FormItem($itemData); $output = $item->renderLabel(); $output .= '<textarea'; $output .= $item->renderAttributes(true); $output .= '>'; $output .= $item->value; $output .= '</textarea>' . "\n"; return $output; }