/** * @return \yii\db\ActiveQuery */ public function getAttribute($name = '') { return $this->hasOne(EavAttribute::className(), ['id' => 'attribute_id']); }
/** * @return \yii\db\ActiveQuery */ public function getEavAttributes() { return $this->hasMany(EavAttribute::className(), ['id' => 'entity_id'])->viaTable('{{%eav_entity_attribute}}', ['attribute_id' => 'id'])->orderBy(['order' => SORT_DESC]); }