コード例 #1
0
 /**
  * Adds multi-line text input control to the form.
  * @param  string  control name
  * @param  string  label
  * @param  int  width of the control
  * @param  int  height of the control in text lines
  * @return Nette\Forms\Controls\TextArea
  */
 public function addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
 {
     $control = new Controls\TextArea($label);
     $control->setAttribute('cols', $cols)->setAttribute('rows', $rows);
     return $this[$name] = $control;
 }
コード例 #2
0
ファイル: Container.php プロジェクト: rostenkowski/nette
 /**
  * Adds multi-line text input control to the form.
  * @param  string  control name
  * @param  string  label
  * @param  int  width of the control
  * @param  int  height of the control in text lines
  * @return Nette\Forms\Controls\TextArea
  */
 public function addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
 {
     $control = new Controls\TextArea($label);
     if ($cols || $rows) {
         trigger_error(__METHOD__ . '() parameters $cols and $rows are deprecated, use setAttribute(...).', E_USER_DEPRECATED);
         $control->setAttribute('cols', $cols)->setAttribute('rows', $rows);
     }
     return $this[$name] = $control;
 }