db\BaseActiveRecord canGetProperty()

canGetProperty() public method Returns a value indicating whether a property can be read. A property can be read if: the class has a getter method associated with the specified name (in this case, property name is case-insensitive); the class has a member variable with the specified name (when $checkVars is true); an attached behavior has a readable property of the given name (when $checkBehaviors is true). public boolean canGetProperty ( $name, $checkVars = true, $checkBehaviors = true )

db\BaseActiveRecord beforeSave()

beforeSave() public method This method is called at the beginning of inserting or updating a record. The default implementation will trigger an EVENT_BEFORE_INSERT event when $insert is true, or an EVENT_BEFORE_UPDATE event if $insert is false. When overriding this method, make sure you call the parent implementation like the following: public function beforeSave($insert) { if (parent::beforeSave($insert)) { // ...custom code here... return true; } else { ret

db\BaseActiveRecord beforeDelete()

beforeDelete() public method This method is invoked before deleting a record. The default implementation raises the EVENT_BEFORE_DELETE event. When overriding this method, make sure you call the parent implementation like the following: public function beforeDelete() { if (parent::beforeDelete()) { // ...custom code here... return true; } else { return false; } } public boolean beforeDelete ( )return boolean Whether the record should be deleted. Defau

db\BaseActiveRecord afterSave()

afterSave() public method This method is called at the end of inserting or updating a record. The default implementation will trigger an EVENT_AFTER_INSERT event when $insert is true, or an EVENT_AFTER_UPDATE event if $insert is false. The event class used is yii\db\AfterSaveEvent. When overriding this method, make sure you call the parent implementation so that the event is triggered. public void afterSave ( $insert, $changedAttributes )$insert boolean Whether this method called while i

db\BaseActiveRecord afterRefresh()

afterRefresh() public method (available since version 2.0.8) This method is called when the AR object is refreshed. The default implementation will trigger an EVENT_AFTER_REFRESH event. When overriding this method, make sure you call the parent implementation to ensure the event is triggered. public void afterRefresh ( )

db\BaseActiveRecord afterFind()

afterFind() public method This method is called when the AR object is created and populated with the query result. The default implementation will trigger an EVENT_AFTER_FIND event. When overriding this method, make sure you call the parent implementation to ensure the event is triggered. public void afterFind ( )

db\BaseActiveRecord afterDelete()

afterDelete() public method This method is invoked after deleting a record. The default implementation raises the EVENT_AFTER_DELETE event. You may override this method to do postprocessing after the record is deleted. Make sure you call the parent implementation so that the event is raised properly. public void afterDelete ( )

db\BaseActiveRecord $relatedRecords

$relatedRecords public read-only property An array of related records indexed by relation names. public array getRelatedRecords ( )

db\BaseActiveRecord $primaryKey

$primaryKey public read-only property The primary key value. An array (column name => column value) is returned if the primary key is composite or $asArray is true. A string is returned otherwise (null will be returned if the key value is null). public mixed getPrimaryKey ( $asArray = false )

db\BaseActiveRecord $oldPrimaryKey

$oldPrimaryKey public read-only property The old primary key value. An array (column name => column value) is returned if the primary key is composite or $asArray is true. A string is returned otherwise (null will be returned if the key value is null). public mixed getOldPrimaryKey ( $asArray = false )