Exemplo n.º 1
0
 public function save()
 {
     $model = new CharactValue();
     $model->charactId = $this->attrId;
     $model->title = $this->value;
     $model->productId = $this->productId;
     $model->save();
 }
Exemplo n.º 2
0
 public function valueGet($attrId)
 {
     $model = CharactValue::find()->lang()->andWhere(['charactId' => $attrId])->one();
     return $model ? $model->title : null;
 }