public function createForm($model, $formClass = null)
    {
        if (is_string($model)) {
            return $this->createFormInternal($model, new $model, $formClass);
        } else {
            return $this->createFormInternal(get_class($model), $model, $formClass);
        }
    }