mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed $rows and $cols constructor arguments on TextareaField and HtmlEditorField, use setRows() and setCols() instead
This commit is contained in:
parent
d678c12ac8
commit
1a10e8bcf5
@ -19,8 +19,10 @@ class HtmlEditorField extends TextareaField {
|
|||||||
/**
|
/**
|
||||||
* @see TextareaField::__construct()
|
* @see TextareaField::__construct()
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $title = null, $rows = 30, $cols = 20, $value = '', $form = null) {
|
public function __construct($name, $title = null, $value = '') {
|
||||||
parent::__construct($name, $title, $rows, $cols, $value, $form);
|
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();
|
self::include_js();
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,12 @@ class TextareaField extends FormField {
|
|||||||
*
|
*
|
||||||
* @param $name Field name
|
* @param $name Field name
|
||||||
* @param $title Field title
|
* @param $title Field title
|
||||||
* @param $rows The number of rows
|
|
||||||
* @param $cols The number of columns
|
|
||||||
* @param $value The current value
|
* @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) {
|
function __construct($name, $title = null, $value = '') {
|
||||||
$this->rows = $rows;
|
if(count(func_get_args()) > 3) Deprecation::notice('3.0', 'Use setRows() and setCols() instead of constructor arguments');
|
||||||
$this->cols = $cols;
|
|
||||||
parent::__construct($name, $title, $value, $form);
|
parent::__construct($name, $title, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAttributes() {
|
function getAttributes() {
|
||||||
|
Loading…
Reference in New Issue
Block a user