db\ActiveRecordInterface unlink()

unlink() public abstract method

Destroys the relationship between two records.

The record with the foreign key of the relationship will be deleted if $delete is true. Otherwise, the foreign key will be set null and the record will be saved without validation.

public abstract void unlink ( $name, $model, $delete = false )
$name string

The case sensitive name of the relationship, e.g. orders for a relation defined via getOrders() method.

$model static

The model to be unlinked from the current one.

$delete boolean

Whether to delete the model that contains the foreign key. If false, the model's foreign key will be set null and saved. If true, the model containing the foreign key will be deleted.

doc_Yii
2016-10-30 16:56:30
Comments
Leave a Comment

Please login to continue.