@@ -238,10 +238,7 @@ public function getForm($need = TRUE)
238238 public function addText ($ name , $ label = NULL , $ cols = NULL , $ maxLength = NULL )
239239 {
240240 $ control = new Controls \TextInput ($ label , $ maxLength );
241- if ($ cols ) {
242- trigger_error (__METHOD__ . '() third parameter $cols is deprecated, use setAttribute("size", ...). ' , E_USER_DEPRECATED );
243- $ control ->setAttribute ('size ' , $ cols );
244- }
241+ $ control ->setAttribute ('size ' , $ cols );
245242 return $ this [$ name ] = $ control ;
246243 }
247244
@@ -257,10 +254,7 @@ public function addText($name, $label = NULL, $cols = NULL, $maxLength = NULL)
257254 public function addPassword ($ name , $ label = NULL , $ cols = NULL , $ maxLength = NULL )
258255 {
259256 $ control = new Controls \TextInput ($ label , $ maxLength );
260- if ($ cols ) {
261- trigger_error (__METHOD__ . '() third parameter $cols is deprecated, use setAttribute("size", ...). ' , E_USER_DEPRECATED );
262- $ control ->setAttribute ('size ' , $ cols );
263- }
257+ $ control ->setAttribute ('size ' , $ cols );
264258 return $ this [$ name ] = $ control ->setType ('password ' );
265259 }
266260
@@ -276,11 +270,8 @@ public function addPassword($name, $label = NULL, $cols = NULL, $maxLength = NUL
276270 public function addTextArea ($ name , $ label = NULL , $ cols = NULL , $ rows = NULL )
277271 {
278272 $ control = new Controls \TextArea ($ label );
279- if ($ cols ) {
280- trigger_error (__METHOD__ . '() parameters $cols is deprecated, use setAttribute("cols", ...). ' , E_USER_DEPRECATED );
281- $ control ->setAttribute ('cols ' , $ cols );
282- }
283- return $ this [$ name ] = $ control ->setAttribute ('rows ' , $ rows );
273+ $ control ->setAttribute ('cols ' , $ cols )->setAttribute ('rows ' , $ rows );
274+ return $ this [$ name ] = $ control ;
284275 }
285276
286277
0 commit comments