/**
  * @return \yii\db\ActiveQuery
  */
 public function getAttribute($name = '')
 {
     return $this->hasOne(EavAttribute::className(), ['id' => 'attribute_id']);
 }
Esempio n. 2
0
 /**
  * @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]);
 }