The form has been generated successfully.
You may add the following code in an appropriate controller class to invoke the view:
$code
EOD;
}
/**
* Validates [[viewPath]] to make sure it is a valid path or path alias and exists.
*/
public function validateViewPath()
{
$path = Yii::getAlias($this->viewPath, false);
if ($path === false || !is_dir($path)) {
$this->addError('viewPath', 'View path does not exist.');
}
}
/**
* @return array list of safe attributes of [[modelClass]]
*/
public function getModelAttributes()
{
/* @var $model Model */
$model = new $this->modelClass();
if (!empty($this->scenarioName)) {
$model->setScenario($this->scenarioName);
}
return $model->safeAttributes();
}
}