db\ActiveRelationTrait findFor()

findFor() public method

Finds the related records for the specified primary record.

This method is invoked when a relation of an ActiveRecord is being accessed in a lazy fashion.

public mixed findFor ( $name, $model )
$name string

The relation name

$model yii\db\ActiveRecordInterface|yii\db\BaseActiveRecord

The primary model

return mixed

The related record(s)

throws yii\base\InvalidParamException

if the relation is invalid

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

Please login to continue.