getRelation() public method
Returns the relation object with the specified name. A relation is defined by a getter method which returns an yii\db\ActiveQueryInterface object. It can be declared in either the Active Record class itself or one of its behaviors.
public yii\db\ActiveQueryInterface|yii\db\ActiveQuery getRelation ( $name, $throwException = true )$name string
The relation name, e.g. orders for a relation defined via getOrders() method (case-sensitive). $throwException boolean