public function formName()
    {
        $reflector = new ReflectionClass($this);
        if (PHP_VERSION_ID >= 70000 && $reflector->isAnonymous()) {
            throw new InvalidConfigException('The "formName()" method should be explicitly defined for anonymous models');
        }
        return $reflector->getShortName();
    }
public function formName()
    {
        $reflector = new ReflectionClass($this);
        if (PHP_VERSION_ID >= 70000 && $reflector->isAnonymous()) {
            throw new InvalidConfigException('The "formName()" method should be explicitly defined for anonymous models');
        }
        return $reflector->getShortName();
    }
Returns the form name that this model class should use.

The form name is mainly used by [[\yii\widgets\ActiveForm]] to determine how to name
the input fields for the attributes in a model. If the form name is "A" and an attribute
name is "b", then the corresponding input name would be "A[b]". If the form name is
an empty string, then the input name would be "b".

The purpose of the above naming schema is that for forms which contain multiple different models,
the attributes of each model are grouped in sub-arrays of the POST-data and it is easier to
differentiate between them.

By default, this method returns the model class name (without the namespace part)
as the form name. You may override it when the model is used in different forms.

@return string the form name of this model class.
@see load()
@throws InvalidConfigException when form is defined with anonymous class and `formName()` method is
not overridden.