| @@ 475-481 (lines=7) @@ | ||
| 472 | ['and', 'object_model_id = :id', ['in', 'category_id', $remove]], |
|
| 473 | [':id' => $this->id] |
|
| 474 | )->execute(); |
|
| 475 | if (!empty($add)) { |
|
| 476 | Yii::$app->db->createCommand()->batchInsert( |
|
| 477 | $object->categories_table_name, |
|
| 478 | ['category_id', 'object_model_id'], |
|
| 479 | $add |
|
| 480 | )->execute(); |
|
| 481 | } |
|
| 482 | ||
| 483 | ||
| 484 | } |
|
| @@ 421-427 (lines=7) @@ | ||
| 418 | $model->id |
|
| 419 | ]; |
|
| 420 | } |
|
| 421 | if (!empty($add)) { |
|
| 422 | Yii::$app->db->createCommand()->batchInsert( |
|
| 423 | $object->categories_table_name, |
|
| 424 | ['category_id', 'object_model_id'], |
|
| 425 | $add |
|
| 426 | )->execute(); |
|
| 427 | } |
|
| 428 | ||
| 429 | $params = $parent->images; |
|
| 430 | if (!empty($params)) { |
|