getRelation() public abstract method
Returns the relation object with the specified name.
A relation is defined by a getter method which returns an object implementing the yii\db\ActiveQueryInterface (normally this would be a relational yii\db\ActiveQuery object). It can be declared in either the ActiveRecord class itself or one of its behaviors.
public abstract yii\db\ActiveQueryInterface getRelation ( $name, $throwException = true ) | ||
---|---|---|
$name | string |
The relation name, e.g. |
$throwException | boolean |
Whether to throw exception if the relation does not exist. |
return | yii\db\ActiveQueryInterface |
The relational query object |
Please login to continue.