I try to render widget into another widget and I have trouble with assets.
class MyWidget extends Widget
{
public function run()
{
$form = ActiveForm::begin();
ActiveForm::end();
}
}
In browser console i have jQuery(...).yiiActiveForm is not a function message.
If I add \yii\widgets\ActiveFormAsset::register($this) into layout then all works.