yii\widgets\InputWidget::hasModel PHP Method

hasModel() protected method

protected hasModel ( ) : boolean
return boolean whether this widget is associated with a data model.
    protected function hasModel()
    {
        return $this->model instanceof Model && $this->attribute !== null;
    }
InputWidget