db\BaseActiveRecord getAttributeHint()

getAttributeHint() public method (available since version 2.0.4) Returns the text hint for the specified attribute. If the attribute looks like relatedModel.attribute, then the attribute will be received from the related model. See also attributeHints(). public string getAttributeHint ( $attribute )$attribute string The attribute name return string The attribute hint

db\BaseActiveRecord getAttribute()

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

db\BaseActiveRecord findOne()

findOne() public static method Returns a single active record model instance by a primary key or an array of column values. The method accepts: a scalar value (integer or string): query by a single primary key value and return the corresponding record (or null if not found). a non-associative array: query by a list of primary key values and return the first record (or null if not found). an associative array of name-value pairs: query by a set of attribute values and return a single record

db\BaseActiveRecord findByCondition()

findByCondition() protected static method Finds ActiveRecord instance(s) by the given condition. This method is internally called by findOne() and findAll(). protected static yii\db\ActiveQueryInterface findByCondition ( $condition )$condition mixed Please refer to findOne() for the explanation of this parameter return yii\db\ActiveQueryInterface The newly created ActiveQuery instance. throws yii\base\InvalidConfigException if there is no primary key defined

db\BaseActiveRecord findAll()

findAll() public static method Returns a list of active record models that match the specified primary key value(s) or a set of column values. The method accepts: a scalar value (integer or string): query by a single primary key value and return an array containing the corresponding record (or an empty array if not found). a non-associative array: query by a list of primary key values and return the corresponding records (or an empty array if none was found). Note that an empty condition wi

db\BaseActiveRecord 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

db\BaseActiveRecord extraFields()

extraFields() public method Returns the list of fields that can be expanded further and returned by toArray(). This method is similar to fields() except that the list of fields returned by this method are not returned by default by toArray(). Only when field names to be expanded are explicitly specified when calling toArray(), will their values be exported. The default implementation returns an empty array. You may override this method to return a list of expandable fields based on some con

db\BaseActiveRecord EVENT_INIT

EVENT_INIT event of type yii\base\Event An event that is triggered when the record is initialized via init().

db\BaseActiveRecord EVENT_BEFORE_UPDATE

EVENT_BEFORE_UPDATE event of type yii\base\ModelEvent An event that is triggered before updating a record. You may set yii\base\ModelEvent::$isValid to be false to stop the update.

db\BaseActiveRecord EVENT_BEFORE_INSERT

EVENT_BEFORE_INSERT event of type yii\base\ModelEvent An event that is triggered before inserting a record. You may set yii\base\ModelEvent::$isValid to be false to stop the insertion.