/** * @return \yii\db\ActiveQuery */ public function getDocumenttypes() { return $this->hasMany(Documenttype::className(), ['TopicTypeId' => 'TopicTypeId']); }
/** * @return \yii\db\ActiveQuery */ public function getDocumentType() { return $this->hasOne(Documenttype::className(), ['DocumentTypeId' => 'DocumentTypeId']); }
/** * @return \yii\db\ActiveQuery */ public function getDocumentTypes() { return $this->hasMany(Documenttype::className(), ['DocumentTypeId' => 'DocumentTypeId'])->viaTable('documenttypetopic', ['TopicId' => 'TopicId']); }