| @@ 206-218 (lines=13) @@ | ||
| 203 | /** |
|
| 204 | * @inheritdoc |
|
| 205 | */ |
|
| 206 | public function beforeDelete() |
|
| 207 | { |
|
| 208 | if (false === parent::beforeDelete()) { |
|
| 209 | return false; |
|
| 210 | } |
|
| 211 | ||
| 212 | foreach ($this->children as $child) { |
|
| 213 | /** @var Review $child */ |
|
| 214 | $child->delete(); |
|
| 215 | } |
|
| 216 | ||
| 217 | return true; |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * @return ActiveRecord|null |
|
| @@ 368-378 (lines=11) @@ | ||
| 365 | * Deleting all inserted pages. |
|
| 366 | * @return bool |
|
| 367 | */ |
|
| 368 | public function beforeDelete() |
|
| 369 | { |
|
| 370 | if (!parent::beforeDelete()) { |
|
| 371 | return false; |
|
| 372 | } |
|
| 373 | foreach ($this->children as $child) { |
|
| 374 | /** @var Page $child */ |
|
| 375 | $child->delete(); |
|
| 376 | } |
|
| 377 | return true; |
|
| 378 | } |
|
| 379 | ||
| 380 | public function getChildren() |
|
| 381 | { |
|
| @@ 448-458 (lines=11) @@ | ||
| 445 | * Deleting all inserted products. |
|
| 446 | * @return bool |
|
| 447 | */ |
|
| 448 | public function beforeDelete() |
|
| 449 | { |
|
| 450 | if (!parent::beforeDelete()) { |
|
| 451 | return false; |
|
| 452 | } |
|
| 453 | foreach ($this->children as $child) { |
|
| 454 | /** @var Product $child */ |
|
| 455 | $child->delete(); |
|
| 456 | } |
|
| 457 | return true; |
|
| 458 | } |
|
| 459 | ||
| 460 | public function saveCategoriesBindings(array $categories_ids) |
|
| 461 | { |
|