API CHANGE Removed $rows and $cols constructor arguments on TextareaField and HtmlEditorField, use setRows() and setCols() instead

This commit is contained in:
Ingo Schommer 2012-01-02 17:44:23 +01:00
parent d678c12ac8
commit 1a10e8bcf5
2 changed files with 8 additions and 9 deletions

View File

@ -19,8 +19,10 @@ class HtmlEditorField extends TextareaField {
/**
* @see TextareaField::__construct()
*/
public function __construct($name, $title = null, $rows = 30, $cols = 20, $value = '', $form = null) {
parent::__construct($name, $title, $rows, $cols, $value, $form);
public function __construct($name, $title = null, $value = '') {
if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRows() and setCols() instead of constructor arguments');
parent::__construct($name, $title, $value);
self::include_js();
}

View File

@ -31,15 +31,12 @@ class TextareaField extends FormField {
*
* @param $name Field name
* @param $title Field title
* @param $rows The number of rows
* @param $cols The number of columns
* @param $value The current value
* @param $form The parent form. Auto-set when the field is placed in a form.
*/
function __construct($name, $title = null, $rows = 5, $cols = 20, $value = "", $form = null) {
$this->rows = $rows;
$this->cols = $cols;
parent::__construct($name, $title, $value, $form);
function __construct($name, $title = null, $value = '') {
if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRows() and setCols() instead of constructor arguments');
parent::__construct($name, $title, $value);
}
function getAttributes() {