| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function onEdit(): array |
||
| 52 | { |
||
| 53 | $relation = $this->relation(); |
||
| 54 | |||
| 55 | if (static::MODE_CHECKBOXES === $this->editMode && $this->completeList) { |
||
| 56 | $values = $relation->getRelated()->all(); |
||
| 57 | } else { |
||
| 58 | $values = $this->value(); |
||
| 59 | } |
||
| 60 | |||
| 61 | return [ |
||
| 62 | 'relation' => $relation, |
||
| 63 | 'searchable' => get_class($relation->getRelated()), |
||
| 64 | 'values' => $values, |
||
| 65 | 'completeList' => $this->completeList, |
||
| 66 | 'titleField' => $this->titleField, |
||
| 67 | 'editMode' => $this->editMode, |
||
| 68 | ]; |
||
| 71 |