| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Anomaly\DashboardModule\Widget\Extension\Form; |
||
| 21 | public function onSavingConfiguration() |
||
| 22 | { |
||
| 23 | /* @var WidgetFormBuilder $form */ |
||
| 24 | $form = $this->forms->get('widget'); |
||
| 25 | |||
| 26 | /* @var WidgetInterface $widget */ |
||
| 27 | $widget = $form->getFormEntry(); |
||
| 28 | |||
| 29 | /* @var ConfigurationFormBuilder $configuration */ |
||
| 30 | $configuration = $this->forms->get('configuration'); |
||
| 31 | |||
| 32 | if (!$configuration->getScope()) { |
||
| 33 | $configuration->setScope($widget->getId()); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 |