base\Model generateAttributeLabel()

generateAttributeLabel() public method Generates a user friendly attribute label based on the give attribute name. This is done by replacing underscores, dashes and dots with blanks and changing the first letter of each word to upper case. For example, 'department_name' or 'DepartmentName' will generate 'Department Name'. public string generateAttributeLabel ( $name )$name string The column name return string The attribute label

base\Model formName()

formName() public method 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 attribut

base\Model fields()

fields() public method Returns the list of fields that should be returned by default by toArray() when no specific fields are specified. A field is a named element in the returned array by toArray(). This method should return an array of field names or field definitions. If the former, the field name will be treated as an object property name whose value will be used as the field value. If the latter, the array key should be the field name while the array value should be the corresponding f

base\Model EVENT_BEFORE_VALIDATE

EVENT_BEFORE_VALIDATE event of type yii\base\ModelEvent An event raised at the beginning of validate(). You may set yii\base\ModelEvent::$isValid to be false to stop the validation.

base\Model EVENT_AFTER_VALIDATE

EVENT_AFTER_VALIDATE event of type yii\base\Event An event raised at the end of validate()

base\Model createValidators()

createValidators() public method Creates validator objects based on the validation rules specified in rules(). Unlike getValidators(), each time this method is called, a new list of validators will be returned. public ArrayObject createValidators ( )return ArrayObject Validators throws yii\base\InvalidConfigException if any validation rule configuration is invalid

base\Model clearErrors()

clearErrors() public method Removes errors for all attributes or a single attribute. public void clearErrors ( $attribute = null )$attribute string Attribute name. Use null to remove errors for all attributes.

base\Model beforeValidate()

beforeValidate() public method This method is invoked before validation starts. The default implementation raises a beforeValidate event. You may override this method to do preliminary checks before validation. Make sure the parent implementation is invoked so that the event can be raised. public boolean beforeValidate ( )return boolean Whether the validation should be executed. Defaults to true. If false is returned, the validation will stop and the model is considered invalid.

base\Model attributes()

attributes() public method Returns the list of attribute names. By default, this method returns all public non-static properties of the class. You may override this method to change the default behavior. public array attributes ( )return array List of attribute names.

base\Model attributeLabels()

attributeLabels() public method Returns the attribute labels. Attribute labels are mainly used for display purpose. For example, given an attribute firstName, we can declare a label First Name which is more user-friendly and can be displayed to end users. By default an attribute label is generated using generateAttributeLabel(). This method allows you to explicitly specify attribute labels. Note, in order to inherit labels defined in the parent class, a child class needs to merge the parent