| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function saveRecord(Model $record, array $definition): bool |
||
| 38 | { |
||
| 39 | if (parent::saveRecord($record, $definition)) { |
||
| 40 | if (array_key_exists('blockTypes', $definition)) { |
||
| 41 | Craft::$app->controller->module->modelMapper->import($definition['blockTypes'], $record->getBlockTypes(), ['fieldId' => $record->id]); |
||
| 42 | } |
||
| 43 | |||
| 44 | return true; |
||
| 45 | } |
||
| 46 | |||
| 47 | return false; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |