public function behaviors() { return array_merge(parent::behaviors(), [['class' => 'mdm\\converter\\RelatedConverter', 'attributes' => ['nmProduct' => [[Product::className(), 'id' => 'product_id'], 'name']]]]); }
/** * @return \yii\db\ActiveQuery */ public function getPrices() { return $this->hasMany(Price::className(), ['price_category_id' => 'id']); }