| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function getSchemaStateDefaults() |
||
| 25 | { |
||
| 26 | $state = parent::getSchemaStateDefaults(); |
||
| 27 | if ($record = $this->getRecord()) { |
||
| 28 | $latest = Versioned::get_latest_version($record->baseClass(), $record->ID); |
||
| 29 | if ($latest) { |
||
| 30 | $state['data']['fileId'] = $latest->ID; |
||
| 31 | $state['data']['latestVersionId'] = $latest->Version; |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | return $state; |
||
| 36 | } |
||
| 37 | |||
| 56 |