createActiveInput() public static method

Creates an active form input of the given type.
public static createActiveInput ( string $type, CModel $model, string $attribute, array $htmlOptions = [], array $data = [] ) : string
$type string the input type.
$model CModel the model instance.
$attribute string the attribute name.
$htmlOptions array additional HTML attributes.
$data array data for multiple select inputs.
return string the input.
Beispiel #1
0
 /**
  * Generates an input for a model attribute.
  * @param string $type the input type.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $htmlOptions additional HTML attributes.
  * @param array $data data for generating the list options (value=>display).
  * @return string the generated input.
  * @see TbHtml::createActiveInput
  */
 public function createInput($type, $model, $attribute, $htmlOptions = array(), $data = array())
 {
     return TbHtml::createActiveInput($type, $model, $attribute, $htmlOptions, $data);
 }