db\BaseActiveRecord hasAttribute()

hasAttribute() public method Returns a value indicating whether the model has an attribute with the specified name. public boolean hasAttribute ( $name )$name string The name of the attribute return boolean Whether the model has an attribute with the specified name.

db\BaseActiveRecord getRelation()

getRelation() public method Returns the relation object with the specified name. A relation is defined by a getter method which returns an yii\db\ActiveQueryInterface object. It can be declared in either the Active Record class itself or one of its behaviors. public yii\db\ActiveQueryInterface|yii\db\ActiveQuery getRelation ( $name, $throwException = true )$name string The relation name, e.g. orders for a relation defined via getOrders() method (case-sensitive). $throwException boolean

db\BaseActiveRecord getRelatedRecords()

getRelatedRecords() public method Returns all populated related records. See also getRelation(). public array getRelatedRecords ( )return array An array of related records indexed by relation names.

db\BaseActiveRecord getPrimaryKey()

getPrimaryKey() public method Returns the primary key value(s). public mixed getPrimaryKey ( $asArray = false )$asArray boolean Whether to return the primary key value as an array. If true, the return value will be an array with column names as keys and column values as values. Note that for composite primary keys, an array will always be returned regardless of this parameter value. return mixed The primary key value. An array (column name => column value) is returned if the primary

db\BaseActiveRecord getOldPrimaryKey()

getOldPrimaryKey() public method Returns the old primary key value(s). This refers to the primary key value that is populated into the record after executing a find method (e.g. find(), findOne()). The value remains unchanged even if the primary key attribute is manually assigned with a different value. public mixed getOldPrimaryKey ( $asArray = false )$asArray boolean Whether to return the primary key value as an array. If true, the return value will be an array with column name as key

db\BaseActiveRecord getOldAttributes()

getOldAttributes() public method Returns the old attribute values. public array getOldAttributes ( )return array The old attribute values (name-value pairs)

db\BaseActiveRecord getOldAttribute()

getOldAttribute() public method Returns the old value of the named attribute. If this record is the result of a query and the attribute is not loaded, null will be returned. See also hasAttribute(). public mixed getOldAttribute ( $name )$name string The attribute name return mixed The old attribute value. null if the attribute is not loaded before or does not exist.

db\BaseActiveRecord getIsNewRecord()

getIsNewRecord() public method Returns a value indicating whether the current record is new. public boolean getIsNewRecord ( )return boolean Whether the record is new and should be inserted when calling save().

db\BaseActiveRecord getDirtyAttributes()

getDirtyAttributes() public method Returns the attribute values that have been modified since they are loaded or saved most recently. The comparison of new and old values is made for identical values using ===. public array getDirtyAttributes ( $names = null )$names string[]|null The names of the attributes whose values may be returned if they are changed recently. If null, attributes() will be used. return array The changed attribute values (name-value pairs)

db\BaseActiveRecord getAttributeLabel()

getAttributeLabel() public method Returns the text label for the specified attribute. If the attribute looks like relatedModel.attribute, then the attribute will be received from the related model. See also: generateAttributeLabel() attributeLabels() public string getAttributeLabel ( $attribute )$attribute string The attribute name return string The attribute label