| @@ 67-75 (lines=9) @@ | ||
| 64 | )->column(); |
|
| 65 | ||
| 66 | $properties = Property::find()->andWhere(['in', 'property_group_id', $property_groups_ids_for_object])->all(); |
|
| 67 | foreach ($properties as $prop) { |
|
| 68 | /** @var Property $prop */ |
|
| 69 | $static_values_properties[$prop->id] = [ |
|
| 70 | 'property' => $prop, |
|
| 71 | 'static_values_select' => PropertyStaticValues::getSelectForPropertyId($prop->id), |
|
| 72 | 'has_static_values' => $prop->has_static_values === 1, |
|
| 73 | ||
| 74 | ]; |
|
| 75 | } |
|
| 76 | ||
| 77 | $post = \Yii::$app->request->post(); |
|
| 78 | if ($model->load($post) && $model->validate()) { |
|
| @@ 101-107 (lines=7) @@ | ||
| 98 | 'has_slugs_in_values' => 1, |
|
| 99 | ] |
|
| 100 | )->andWhere(['in', 'property_group_id', $property_groups_ids_for_object])->all(); |
|
| 101 | foreach ($properties as $prop) { |
|
| 102 | $static_values_properties[$prop->id] = [ |
|
| 103 | 'has_static_values' => true, |
|
| 104 | 'property' => $prop, |
|
| 105 | 'static_values_select' => PropertyStaticValues::getSelectForPropertyId($prop->id), |
|
| 106 | ]; |
|
| 107 | } |
|
| 108 | ||
| 109 | if ($model->load($post) && $model->validate()&&!isset($get['DynamicContent'])) { |
|
| 110 | $save_result = $model->save(); |
|