| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function getRecordDefinition(Model $record): array |
||
| 27 | { |
||
| 28 | $definition = parent::getRecordDefinition($record); |
||
| 29 | |||
| 30 | if ($record instanceof SectionModel) { |
||
| 31 | $definition['entryTypes'] = Craft::$app->controller->module->modelMapper->export($record->getEntryTypes()); |
||
| 32 | } |
||
| 33 | |||
| 34 | if ($record instanceof Section_SiteSettings) { |
||
| 35 | unset($definition['attributes']['sectionId']); |
||
| 36 | unset($definition['attributes']['siteId']); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $definition; |
||
| 40 | } |
||
| 41 | |||
| 64 |