/** * @return \yii\db\ActiveQuery */ public function getEavAttributes() { return $this->hasMany(EavAttribute::className(), ['typeId' => 'id'])->orderBy(['order' => SORT_DESC]); }
/** * @return \yii\db\ActiveQuery */ public function getEavAttribute() { return $this->hasOne(EavAttribute::className(), ['id' => 'attributeId']); }