Trait kartik\builder\FormTrait

Implemented bykartik\builder\BaseForm, kartik\builder\Form, kartik\builder\TabularForm
Available since version1.0

FormTrait contains common methods for use in kartik\builder\BaseForm builder widget in yii2-builder. These methods are also used by the kartik\builder\Form and kartik\builder\TabularForm widgets.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
checkBaseConfig() Checks base configuration and throws a configuration exception if invalid. kartik\builder\FormTrait
checkFormConfig() Checks the form configuration and throws a configuration exception if invalid. kartik\builder\FormTrait
hasModel() Check if a valid model is set for the object instance. kartik\builder\FormTrait

Method Details

checkBaseConfig() protected method

Checks base configuration and throws a configuration exception if invalid.

protected void checkBaseConfig ( )
throws yii\base\InvalidConfigException
checkFormConfig() protected method

Checks the form configuration and throws a configuration exception if invalid.

protected void checkFormConfig ( )
throws yii\base\InvalidConfigException
hasModel() protected method

Check if a valid model is set for the object instance.

protected boolean hasModel ( )
return boolean

Whether there is a valid model set.