ENHANCEMENT: added setRows() and setColumns() to customize the size of the textarea field outside of the controller

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106118 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2010-06-03 01:08:58 +00:00 committed by Sam Minnee
parent d7efcc4aaf
commit 917a0545ce

View File

@ -93,5 +93,22 @@ class TextareaField extends FormField {
function Type() { function Type() {
return parent::Type() . ( $this->readonly ? ' readonly' : '' ); return parent::Type() . ( $this->readonly ? ' readonly' : '' );
} }
}
?> /**
* Set the number of rows in the textarea
*
* @param int
*/
function setRows($rows) {
$this->rows = $rows;
}
/**
* Set the number of columns in the textarea
*
* @return int
*/
function setColumns($cols) {
$this->cols = $cols;
}
}