/** * @return \yii\db\ActiveQuery */ public function getEntity() { return $this->hasMany(EavEntity::className(), ['id' => 'entity_id'])->viaTable('{{%eav_entity_attribute}}', ['attribute_id' => 'id']); }