protected function findModel($id)
 {
     if (($model = FieldValueVariant::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested variant does not exist.');
     }
 }
Esempio n. 2
0
 public static function editField($id, $name, $value)
 {
     $setting = FieldValueVariant::findOne($id);
     $setting->{$name} = $value;
     $setting->save();
 }