/** * @return \yii\db\ActiveQuery */ public function getOrderTemplate() { return $this->hasMany(OrderAttribute::className(), ['attribute_name' => 'attribute_name'])->viaTable('order_attribute_to_store', ['store_id' => 'store_id'])->asArray(); }
/** * @return \yii\db\ActiveQuery */ public function getEditableAttributes() { return $this->hasMany(OrderAttribute::className(), ['attribute_name' => 'attribute_name'])->viaTable('order_item_to_attribute_edit', ['item_name' => 'name']); }