PHP 클래스 yii\widgets\InputWidget

An input widget can be associated with a data model and an attribute, or a name and a value. If the former, the name and the value will be generated automatically. Classes extending from this widget can be used in an [[\yii\widgets\ActiveForm|ActiveForm]] using the [[\yii\widgets\ActiveField::widget()|widget()]] method, for example like this: php field($model, 'from_date')->widget('WidgetClassName', [ configure additional widget properties here ]) ?> For more details and usage information on InputWidget, see the guide article on forms.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\base\Widget
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$attribute the model attribute that this widget is associated with.
$model the data model that this widget is associated with.
$name the input name. This must be set if [[model]] and [[attribute]] are not set.
$options the HTML attributes for the input tag.
$value the input value.

공개 메소드들

메소드 설명
init ( ) Initializes the widget.

보호된 메소드들

메소드 설명
hasModel ( ) : boolean

메소드 상세

hasModel() 보호된 메소드

protected hasModel ( ) : boolean
리턴 boolean whether this widget is associated with a data model.

init() 공개 메소드

If you override this method, make sure you call the parent implementation first.
public init ( )

프로퍼티 상세

$attribute 공개적으로 프로퍼티

the model attribute that this widget is associated with.
public $attribute

$model 공개적으로 프로퍼티

the data model that this widget is associated with.
public $model

$name 공개적으로 프로퍼티

the input name. This must be set if [[model]] and [[attribute]] are not set.
public $name

$options 공개적으로 프로퍼티

the HTML attributes for the input tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$value 공개적으로 프로퍼티

the input value.
public $value