/** * @return \yii\db\ActiveQuery */ public function getUpLinks() { return $this->hasMany(Links::className(), ['to' => 'id']); }