| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | protected function setParent(ObjectEntity $entity, string $folder): void |
||
| 34 | { |
||
| 35 | $parentEntity = $this->fetchTable('Folders')->find('unameId', [$folder])->firstOrFail(); |
||
| 36 | $association = $entity->getTable()->associations()->getByProperty('parents'); |
||
| 37 | $action = new SetRelatedObjectsAction(compact('association')); |
||
| 38 | $relatedEntities = [$parentEntity]; |
||
| 39 | $action(compact('entity', 'relatedEntities')); |
||
| 40 | } |
||
| 42 |